• Advertisement

Archived

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

Win32 DialogBox problems

This topic is 5910 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

i''m having problems with setting up a simple dialog box under win with MSVC++6. you can download my "project" here http://vesoljc.tripod.com/Download/DialogBox.zip 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
Advertisement

  • Advertisement