在线看毛片网站电影-亚洲国产欧美日韩精品一区二区三区,国产欧美乱夫不卡无乱码,国产精品欧美久久久天天影视,精品一区二区三区视频在线观看,亚洲国产精品人成乱码天天看,日韩久久久一区,91精品国产91免费

<menu id="6qfwx"><li id="6qfwx"></li></menu>
    1. <menu id="6qfwx"><dl id="6qfwx"></dl></menu>

      <label id="6qfwx"><ol id="6qfwx"></ol></label><menu id="6qfwx"></menu><object id="6qfwx"><strike id="6qfwx"><noscript id="6qfwx"></noscript></strike></object>
        1. <center id="6qfwx"><dl id="6qfwx"></dl></center>

            新聞中心

            創(chuàng)建對話框

            作者: 時(shí)間:2016-09-12 來源:網(wǎng)絡(luò) 收藏

            首選需要創(chuàng)建一個(gè)對話框

            本文引用地址:http://www.biyoush.com/article/201609/303400.htm

            所以應(yīng)該包含resource.h資源文件

            .h 文件:

            struct DecodeUint{

            UINT meesage;

            LONG (*fun)(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);

            };

            #define dim(x) (sizeof(x)/sizeof(x[0]))

            LONG OnInit(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);

            LONG OnCommand(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);

            LONG OnClose(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);

            BOOL CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);

            .c文件:

            #include

            #include

            #include Border.h

            #include resource.h

            struct DecodeUint DlgMessage[] = {

            WM_INITDIALOG,OnInit,

            WM_COMMAND,OnCommand,

            };

            struct DecodeUint DlgCommand[] = {

            IDOK,OnClose,

            IDCANCEL,OnClose,

            };

            LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);

            int WinMain(HINSTANCE hInstance,

            HINSTANCE hPrevInstance,

            LPTSTR lpCmdLine,

            int nCmdShow)

            {

            DialogBox(hInstance,MAKEINTRESOURCE(IDD_DIALOG1),NULL,About);

            return 1;

            }

            BOOL CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)

            {

            for (int i = 0;i dim(DlgMessage);i ++)

            {

            if (DlgMessage[i].meesage == message)

            {

            (*DlgMessage[i].fun)(hDlg,message,wParam,lParam);

            }

            }

            return FALSE;

            }

            LONG OnInit(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)

            {

            return TRUE;

            }

            LONG OnCommand(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)

            {

            for (int i = 0;i dim(DlgCommand);i ++)

            {

            if (DlgCommand[i].meesage == LOWORD(wParam))

            {

            (*DlgCommand[i].fun)(hDlg,message,wParam,lParam);

            }

            }

            return TRUE;

            }

            LONG OnClose(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)

            {

            EndDialog(hDlg,0);

            return TRUE;

            }



            關(guān)鍵詞: WinCE

            評論


            相關(guān)推薦

            技術(shù)專區(qū)

            關(guān)閉