|
#include <windows.h>
#include <commdlg.h>
#include "resource.h"
BOOL CALLBACK MainDlgProc (HWND, UINT, WPARAM, LPARAM);
int WINAPI WinMain (HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpcmdLine,
int nCmdShow)
{
HWND hwnd;
MSG msg;
Ranch
hwnd = CreateDialog (hInstance, MAKEINTRESOURCE (IDD_TidyMain),
NULL,
MainDlgProc);
ShowWindow (hwnd, SW_SHOW);
UpdateWindow (hwnd);
while (GetMessage (&msg, NULL, 0,0))
{
TranslateMessage (&msg);
DispatchMessage (&msg);
}
return msg.wParam;
}
BOOL CALLBACK MainDlgProc (HWND hDlg,
UINT message,
WPARAM wParam,
LPARAM lParam)
{
switch (message)
{
case WM_INITDIALOG:
return TRUE;
case WM_COMMAND:
switch (LOWORD (wParam))
{
}
return FALSE;
case WM_CLOSE:
EndDialog (hDlg, 0);
return TRUE;
}
return FALSE;
} |
|