亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? dialogs.c

?? 也是關于VB的,不知道對你們有沒有用處.是我下的.
?? C
?? 第 1 頁 / 共 5 頁
字號:
/**************************************************************************
 *
 *  THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
 *  KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
 *  IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
 *  PURPOSE.
 *
 *  Copyright (C) 1992 - 1996 Microsoft Corporation.  All Rights Reserved.
 *
 **************************************************************************/
/****************************************************************************
 *
 *   dialogs.c: Dialog box processing
 *
 *   Vidcap32 Source code
 *
 ***************************************************************************/

#include <windows.h>
#include <windowsx.h>
#include <commdlg.h>
#include <mmsystem.h>
#include <mmreg.h>
#include <io.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <memory.h>
#include <dos.h>
#include <vfw.h>

#include "arrow.h"
#include "rlmeter.h"
#include "vidcap.h"
#include "vidframe.h"
#include "help.h"

static long GetFreeDiskSpaceInKB(LPTSTR) ;
static int  CountMCIDevices(WORD) ;

BOOL FAR PASCAL MCISetupProc(HWND, unsigned, UINT, LONG);


//--- utility functions  ---------------------------------------------------



/*----------------------------------------------------------------------------*\
|   SmartWindowPosition (HWND hWndDlg, HWND hWndShow)
|                                                                              |
|   Description:                                                               |
|       This function attempts to position a dialog box so that it
|       does not obscure the hWndShow window. This function is
|       typically called during WM_INITDIALOG processing.
|                                                                              |
|   Arguments:                                                                 |
|       hWndDlg         handle of the soon to be displayed dialog
|       hWndShow        handle of the window to keep visible
|                                                                              |
|   Returns:                                                                   |
|       1 if the windows overlap and positions were adjusted
|       0 if the windows don't overlap
|                                                                              |
\*----------------------------------------------------------------------------*/
int SmartWindowPosition (HWND hWndDlg, HWND hWndShow)
{
    RECT rc, rcDlg, rcShow;
    int iHeight, iWidth;
    int iScreenHeight, iScreenWidth;

    GetWindowRect(hWndDlg, &rcDlg);
    GetWindowRect(hWndShow, &rcShow);

    iScreenHeight = GetSystemMetrics(SM_CYSCREEN);
    iScreenWidth = GetSystemMetrics(SM_CXSCREEN);

    InflateRect (&rcShow, 5, 5); // allow a small border
    if (IntersectRect(&rc, &rcDlg, &rcShow)){
        /* the two do intersect, now figure out where to place */
        /* this dialog window.  Try to go below the Show window*/
        /* first and then to the right, top and left.	   */

        /* get the size of this dialog */
        iHeight = rcDlg.bottom - rcDlg.top;
        iWidth = rcDlg.right - rcDlg.left;

        if ((WORD)(rcShow.bottom + iHeight + 1) <  iScreenHeight){
                /* will fit on bottom, go for it */
                rc.top = rcShow.bottom + 1;
                rc.left = (((rcShow.right - rcShow.left)/2) + rcShow.left)
    		        - (iWidth/2);
        } else if ((WORD)(rcShow.right + iWidth + 1) < iScreenWidth){
                /* will fit to right, go for it */
                rc.left = rcShow.right + 1;
                rc.top = (((rcShow.bottom - rcShow.top)/2) + rcShow.top)
    	        - (iHeight/2);
        } else if ((WORD)(rcShow.top - iHeight - 1) > 0){
                /* will fit on top, handle that */
                rc.top = rcShow.top - iHeight - 1;
                rc.left = (((rcShow.right - rcShow.left)/2) + rcShow.left)
    		        - (iWidth/2);
        } else if ((WORD)(rcShow.left - iWidth - 1) > 0){
                /* will fit to left, do it */
                rc.left = rcShow.left - iWidth - 1;
                rc.top = (((rcShow.bottom - rcShow.top)/2) + rcShow.top)
    	        - (iHeight/2);
        } else {
                /* we are hosed, they cannot be placed so that there is */
                /* no overlap anywhere.  To minimize the damage just put*/
                /* the dialog in the lower left corner of the screen    */
                rc.top = (int)iScreenHeight - iHeight;
                rc.left = (int)iScreenWidth - iWidth;
        }

        /* make any adjustments necessary to keep it on the screen */
        if (rc.left < 0) rc.left = 0;
        else if ((WORD)(rc.left + iWidth) > iScreenWidth)
                rc.left = (int)(iScreenWidth - iWidth);

        if (rc.top < 0)  rc.top = 0;
        else if ((WORD)(rc.top + iHeight) > iScreenHeight)
                rc.top = (int)iScreenHeight - iHeight;

        SetWindowPos(hWndDlg, NULL, rc.left, rc.top, 0, 0,
    	        SWP_NOSIZE|SWP_NOZORDER|SWP_NOACTIVATE);
        return 1;
    } // if the windows overlap by default

    return 0;
}

//
// GetFreeDiskSpace: Function to Measure Available Disk Space
//
static long GetFreeDiskSpaceInKB(LPTSTR pFile)
{
    DWORD dwFreeClusters, dwBytesPerSector, dwSectorsPerCluster, dwClusters;
    char RootName[MAX_PATH];
    LPSTR ptmp;    //required arg

    // need to find path for root directory on drive containing
    // this file.

    GetFullPathName(pFile, sizeof(RootName)/sizeof(RootName[0]), RootName, &ptmp);

    // truncate this to the name of the root directory (god how tedious)
    if ((RootName[0] == TEXT('\\')) && (RootName[1] == TEXT('\\'))) {

        // path begins with  \\server\share\path so skip the first
        // three backslashes
        ptmp = &RootName[2];
        while (*ptmp && (*ptmp != TEXT('\\'))) {
            ptmp++;
        }
        if (*ptmp) {
            // advance past the third backslash
            ptmp++;
        }
    } else {
        // path must be drv:\path
        ptmp = RootName;
    }

    // find next backslash and put a null after it
    while (*ptmp && (*ptmp != TEXT('\\'))) {
        ptmp++;
    }
    // found a backslash ?
    if (*ptmp) {
        // skip it and insert null
        ptmp++;
        *ptmp = TEXT('\0');
    }



    if (!GetDiskFreeSpace(RootName,
		&dwSectorsPerCluster,
		&dwBytesPerSector,
		&dwFreeClusters,
		&dwClusters)) {
	    MessageBoxID(IDS_ERR_MEASUREFREEDISK, MB_OK | MB_ICONINFORMATION);
	    return (-1);
    }
    return(MulDiv (dwSectorsPerCluster * dwBytesPerSector,
		   dwFreeClusters,
		   1024));
}

//
// CountMCIDevices: Function to Find the Number of MCI Devices of a Type
//
static int CountMCIDevices(WORD wType)
{
    int               nTotal = 0 ;
    DWORD             dwCount ;
    MCI_SYSINFO_PARMS mciSIP ;

    mciSIP.dwCallback = 0 ;
    mciSIP.lpstrReturn = (LPSTR)(LPVOID) &dwCount ;
    mciSIP.dwRetSize = sizeof(DWORD) ;
    mciSIP.wDeviceType = wType ;

    // Use an MCI command to get the info
    if (! mciSendCommand(0, MCI_SYSINFO, MCI_SYSINFO_QUANTITY,
                         (DWORD)(LPVOID) &mciSIP))
        nTotal = (int) *((LPDWORD) mciSIP.lpstrReturn) ;

    return nTotal ;
}



/* lMicroSec = StringRateToMicroSec(szRate)
 *
 * Convert <szRate> (e.g. "3.75" representing 3.75 frames per second)
 * to microseconds (e.g. 266667L microseconds per frame).
 *
 * If the rate is close to zero or negative, then 0L is returned.
 */
DWORD StringRateToMicroSec(PSTR szRate)
{
	double		dRate;

	dRate = atof(szRate);
	
	if (dRate < 0.0001) {
		return 0L;
	} else {
		return (DWORD) /*floor*/((1e6 / dRate) + 0.5);
        }
}

/* ach = MicroSecToStringRate(achRate, lMicroSec)
 *
 * Convert <lMicroSec> (e.g. 266667L microseconds per frame) to a
 * string rate (e.g. "3.75" representing 3.75 frames per second).
 * Returns <achRate>.
 */
PSTR MicroSecToStringRate(PSTR achRate, DWORD dwMicroSec)
{
	sprintf(achRate, "%.3f",
		(dwMicroSec == 0L) ? 0.0 : (1e6 / (double) dwMicroSec));

	return achRate;
}

/*
 * update the text of an edit field based on a comarrow up or down change
 * - write the text in N.NNN format (truncated to an integer)
 */
LONG FAR PASCAL
MilliSecVarArrowEditChange(
    HWND hwndEdit,
    UINT uCode,
    LONG lMin,
    LONG lMax,
    UINT uInc
)
{
    char achTemp[32];
    LONG l;

    GetWindowText(hwndEdit, achTemp, sizeof(achTemp));

    l = atol(achTemp);
    if(uCode == SB_LINEUP ) {

	if(l + (long)uInc <= lMax ) {
	    l += uInc;
	    wsprintf(achTemp, "%ld.000", l );
	    SetWindowText(hwndEdit, achTemp );
        } else {
	    MessageBeep( 0 );
	}
    } else if (uCode == SB_LINEDOWN ) {
	if( l-(long)uInc >= lMin ) {
	    l -= uInc;
	    wsprintf( achTemp, "%ld.000", l );
	    SetWindowText( hwndEdit, achTemp );
        } else {
	    MessageBeep( 0 );
	}
    }
    return( l );
}


BOOL MCIGetDeviceNameAndIndex (HWND hwnd, LPINT lpnIndex, LPSTR lpName)
{
    HWND hwndCB;
    char buf[160];
    char *cp;

    hwndCB = GetDlgItem( hwnd, IDD_MCI_SOURCE );
    *lpnIndex = (int)SendMessage( hwndCB, CB_GETCURSEL, 0, 0L);
    SendMessage( hwndCB, CB_GETLBTEXT, *lpnIndex,
    		(LONG)(LPSTR) buf );
    // Point cp to the system name
    for (cp = buf + lstrlen(buf); cp > buf; cp--) {
        if (*cp == ' ' && *(cp-1) == ',') {
            cp++;
            break;
	}
    }
    lstrcpy (lpName, cp);
    return TRUE;
}


/*--------------------------------------------------------------+
| TimeMSToHMSString() - change milliseconds into a time string   |
+--------------------------------------------------------------*/
void FAR PASCAL TimeMSToHMSString (DWORD dwMS, LPSTR lpTime)
{
	DWORD	dwTotalSecs;
	LONG	lHundredths;
	WORD	wSecs;
	WORD	wMins;
	WORD	wHours;

	/* convert to number of seconds */
	dwTotalSecs = dwMS / 1000;
	
	/* keep the remainder part */
	lHundredths = (dwMS - (dwTotalSecs * 1000)) / 10;
		
	/* break down into other components */
	wHours = (WORD)(dwTotalSecs / 3600);	// get # Hours
	dwTotalSecs -= (wHours * 3600);
	
	wMins = (WORD)(dwTotalSecs / 60);	// get # Mins
	dwTotalSecs -= (wMins * 60);
	
	wSecs = (WORD)dwTotalSecs;	// what's left is # seconds
	
	/* build the string */
	wsprintf((char far *)lpTime, "%02u:%02u:%02u.%02lu", wHours, wMins,
		    wSecs, lHundredths);
}


/*--------------------------------------------------------------+
| TimeHMSStringToMS() - change Time string to milliseconds     |
|                       returns dwMilliseconds or -1 if error  |
+--------------------------------------------------------------*/
LONG NEAR PASCAL  TimeHMSStringToMS (LPSTR lpsz)
{
    char	achTime[12];	// buffer for time string (input)
    DWORD	dwMSecs;	// total MSecs for this thing */
    char	*pDelim;	// pointer to next delimeter
    char	*p;		// general pointer
    DWORD	dwHours = 0;	// # of hours
    DWORD	dwMins = 0;	// # of minutes
    DWORD	dwSecs = 0;		// # of seconds
    WORD	wHundredths = 0;	// # hundredths

    _fstrncpy(achTime, lpsz, sizeof (achTime));

    if (achTime[0] == '\0')
        return -1;	// bad char so error out
    	
    /* rip through the whole string and look for illegal chars */
    for (p = achTime; *p ; p++){
        if (!isdigit(*p) && *p != '.' && *p != ':')
    	return -1;	// bad char so error out
    }

    /* go find the hundredths portion if it exists */
    pDelim = strchr(achTime, '.');
    if (*pDelim){
        p = strrchr(achTime, '.');
        if (pDelim != p) {
    	    return -1;		// string has > 1 '.', return error
        }

        p++;			// move up past delim
        if (strlen(p) > 2) {
    	    *(p+2) = '\0';		// knock off all but hundredths
        }

        wHundredths = atoi(p);	// get the fractional part

        *pDelim = '\0';		// null out this terminator
    }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文字幕免费在线观看视频一区| 成人小视频免费观看| 欧美性色综合网| 亚洲综合一区在线| 欧美日韩精品系列| 天堂久久久久va久久久久| 欧美剧在线免费观看网站| 午夜视频久久久久久| 日韩一区二区免费电影| 精品中文字幕一区二区小辣椒| 欧美成人欧美edvon| 国产一区二区三区黄视频| 国产精品人人做人人爽人人添| 99久久99久久精品免费观看| 亚洲精品亚洲人成人网在线播放| 欧美在线一二三四区| 日韩电影在线观看一区| 久久综合色婷婷| 99久久精品国产毛片| 婷婷激情综合网| 欧美精品一区二区蜜臀亚洲| 99久久综合国产精品| 亚洲成人免费在线观看| 久久综合中文字幕| 色噜噜狠狠色综合欧洲selulu| 亚洲成av人片观看| 久久蜜臀精品av| 色婷婷综合久色| 久久99精品久久久久婷婷| 国产精品久久免费看| 欧洲日韩一区二区三区| 激情另类小说区图片区视频区| 中文字幕日本乱码精品影院| 欧美精品日日鲁夜夜添| 成人精品亚洲人成在线| 日韩电影免费一区| 日韩久久一区二区| 精品成人一区二区三区| 欧美伊人精品成人久久综合97| 久久99精品国产麻豆婷婷洗澡| 亚洲欧美另类在线| 久久久久久97三级| 8v天堂国产在线一区二区| 成人夜色视频网站在线观看| 日日摸夜夜添夜夜添国产精品| 国产精品天天摸av网| 日韩一区二区三区三四区视频在线观看| 不卡一区在线观看| 精品亚洲国内自在自线福利| 亚洲综合成人在线| 亚洲欧洲av在线| 国产视频一区在线播放| 欧美一二三四在线| 在线观看日韩电影| 97精品超碰一区二区三区| 国产在线精品一区二区三区不卡| 午夜视频在线观看一区二区三区| ㊣最新国产の精品bt伙计久久| 精品成人a区在线观看| 337p亚洲精品色噜噜| 在线国产亚洲欧美| 99这里只有久久精品视频| 国产精一区二区三区| 麻豆精品久久精品色综合| 亚洲电影在线播放| 亚洲精品一二三| 亚洲欧美欧美一区二区三区| 中文字幕va一区二区三区| 久久毛片高清国产| 日韩精品一区二区三区视频在线观看 | 国产欧美日韩另类视频免费观看| 欧美精品久久久久久久多人混战 | 国产亚洲欧美在线| 久久综合色播五月| 精品国产一区二区国模嫣然| 91精品麻豆日日躁夜夜躁| 欧美亚洲图片小说| 欧美中文字幕一二三区视频| 欧美在线free| 在线观看欧美黄色| 欧美日韩国产高清一区二区三区| 在线视频中文字幕一区二区| 91黄色小视频| 精品视频123区在线观看| 欧美在线播放高清精品| 欧美精品丝袜中出| 日韩欧美久久一区| 久久先锋影音av| 国产日韩欧美一区二区三区乱码| 国产视频一区二区三区在线观看| 久久九九99视频| 1区2区3区欧美| 一区二区三区不卡在线观看| 亚洲1区2区3区4区| 久久se精品一区二区| 国产一区二区毛片| 91影视在线播放| 欧美性色欧美a在线播放| 在线不卡免费欧美| 精品美女一区二区三区| 久久久久国产精品人| 亚洲欧美色一区| 偷拍与自拍一区| 国产精品原创巨作av| 99热国产精品| 91麻豆精品国产91久久久久 | 亚洲精品久久7777| 丝袜美腿亚洲综合| 国产精品中文字幕一区二区三区| 9久草视频在线视频精品| 欧美系列亚洲系列| 精品日韩一区二区| 亚洲品质自拍视频网站| 婷婷中文字幕综合| 懂色中文一区二区在线播放| 色综合网站在线| 欧美一区二区视频在线观看| 国产目拍亚洲精品99久久精品| 亚洲精品你懂的| 美国三级日本三级久久99| 白白色 亚洲乱淫| 7777精品伊人久久久大香线蕉超级流畅| 精品999久久久| 亚洲一区电影777| 国产精品99久久久久久似苏梦涵| 色999日韩国产欧美一区二区| 日韩精品在线一区二区| 日韩一区在线播放| 精东粉嫩av免费一区二区三区| 91麻豆免费视频| 欧美成va人片在线观看| 亚洲欧美偷拍三级| 国产精品69毛片高清亚洲| 欧美伦理视频网站| 1024成人网| 国产福利一区二区三区视频| 欧美精品亚洲一区二区在线播放| 亚洲欧洲日韩一区二区三区| 麻豆成人综合网| 欧美日韩高清一区| 中文字幕一区视频| 国产伦精品一区二区三区视频青涩 | 成人午夜激情影院| 日韩欧美久久久| 亚洲国产欧美在线| 9色porny自拍视频一区二区| 久久久噜噜噜久久中文字幕色伊伊| 一个色妞综合视频在线观看| 成人综合婷婷国产精品久久蜜臀| 日韩一区二区精品| 亚洲国产精品天堂| 91亚洲精品久久久蜜桃网站| 国产日产精品1区| 国内精品自线一区二区三区视频| 6080日韩午夜伦伦午夜伦| 亚洲综合视频网| 91女人视频在线观看| 中文字幕亚洲区| 成人激情综合网站| 亚洲国产成人自拍| 粉嫩av一区二区三区在线播放| 国产亚洲午夜高清国产拍精品| 久久99久久99| 欧美精品一区二区三区在线| 麻豆成人免费电影| 精品乱码亚洲一区二区不卡| 免费高清在线视频一区·| 欧美一区二区三区系列电影| 性久久久久久久| 91精品国产高清一区二区三区蜜臀 | 成人99免费视频| 午夜精品久久久久久| 欧美在线短视频| 视频在线观看91| 91精品国产丝袜白色高跟鞋| 麻豆国产一区二区| 精品美女一区二区| 国产成人免费av在线| 国产精品女人毛片| 99久久精品国产一区二区三区| 亚洲品质自拍视频网站| 欧美性受极品xxxx喷水| 午夜影院在线观看欧美| 日韩一区二区免费高清| 国模冰冰炮一区二区| 中文字幕欧美国产| 在线欧美日韩精品| 天天综合色天天综合色h| 欧美一级专区免费大片| 久久av老司机精品网站导航| 久久精品人人做人人爽人人| 成人毛片在线观看| 亚洲综合激情另类小说区| 538在线一区二区精品国产| 毛片一区二区三区| 国产精品婷婷午夜在线观看| 91国内精品野花午夜精品 | 欧美国产欧美亚州国产日韩mv天天看完整| 国产乱人伦偷精品视频免下载| 国产精品久久久久久久久免费桃花 |