15,979
社区成员
发帖
与我相关
我的任务
分享
#include "stdafx.h"
#include <windef.h>
#include <winuser.h>
HINSTANCE GetInstanceHandle()
{
char hello[MAX_PATH];
GetModuleFileName(0, hello, MAX_PATH);
HINSTANCE hInstance;
hInstance = GetModuleHandle(hello);
return hInstance;
}
BOOL CALLBACK ConfigBoxProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
switch(message)
{
case WM_INITDIALOG:
return 1;
break;
case WM_COMMAND:
switch(LOWORD(wParam))
{
case IDOK:
case IDCANCEL:
EndDialog(HWND(hDlg), LOWORD(wParam));
return 1;
break;
}
break;
}
return 0;
}
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
DialogBoxParam(GetInstanceHandle(), MAKEINTRESOURCE(101), HWND(1705624), (DLGPROC)ConfigBoxProc, 0);
return 0;
}