Hi,
I am just a beginner at windows programming, so I am wondering, how do I create a dialog-based application (similar to that of using VC++ and MFC) with just the pure windows API?
Currently I am just doing the following, but I have a slight feeling in my gut it's not the correct way to do it
Code:
HWND g_dlg = NULL;
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd)
{
g_dlg = CreateDialog(hInstance, MAKEINTRESOURCE(IDD_CALC), NULL, CalcProc);
ShowWindow(g_dlg, SW_SHOW);
MSG msg;
while (GetMessage(&msg, NULL, 0, 0) > 0)
{
if (!IsDialogMessage(g_dlg, &msg))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
return 0;
}
Any help is greatly appreciated Thank you very much.