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
Any help is greatly appreciatedCode: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; }Thank you very much.



LinkBack URL
About LinkBacks
Thank you very much. 



Thank you Quantum, of course I could do that. Revised code would look something like this for future reference: