This topic is now archived and is closed to further replies.

original vesoljc

Win32 DialogBox problems

Recommended Posts

i''m having problems with setting up a simple dialog box under win with MSVC++6. you can download my "project" here the problem is that my dialog box is not being drawn! only two default buttons (and other controls) are drawn, OK and CANCEL, no title, no borders, nothing. here''s the main code: #include "stdafx.h" BOOL CALLBACK MyDlgProc(HWND hwnd, UINT Msg,WPARAM wParam, LPARAM lParam) { switch(Msg) { case WM_INITDIALOG: Beep(1000,100); break; case WM_COMMAND: switch (LOWORD(wParam)) { case IDOK: Beep(500,100); break; case IDCANCEL: EndDialog(hwnd,FALSE); break; } } return 1; } int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { // TODO: Place code here. DialogBox(hInstance, MAKEINTRESOURCE(IDD_DIALOG1),NULL, MyDlgProc); return 0; } buttons work ok, but the dialog it self is not visible. Abnormal behavior of abnormal brain makes me normal...

Share this post

Link to post
Share on other sites