Jump to content
  • Advertisement

Archived

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

Remnex

Weird Dialog Box Problems

This topic is 5670 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 am currently refreshing my memory on the basics of the Win32 API, and well, I have run into an interesting problem. I wanted to figure out how to call dialog boxes, so after creating a dialog boxes and writing all the code that I needed too, I ran into an interesting problem. All my dialogs appear black except for the controls on the dialog box. I for one cannot figure out what the hell is going on. It cannot be a driver problems, as well, other programs that are doing the same thing work. I have scoured MSDN and the Visual Studio .NET docs for an answer and so far, have found nothing. Here is the source: http://home.earthlink.net/~swalters4/ ------------------------------ "I'm a decorated astronaut, I don't make those kind of mistakes." "Oh now wait a minute. Look I'll show ya. I'll enter the same calculations using what we like to call 'The Right Way'." [edited by - Remnex on February 6, 2003 8:28:56 PM] [edited by - Remnex on February 6, 2003 8:29:29 PM]

Share this post


Link to post
Share on other sites
Advertisement
quote:
Original post by daerid
In your dialog procedure, you must call DefDlgProc the same as if you were calling DefWindowProc


I added that:


  
INT_PTR CALLBACK DialogProc( HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam )
{
switch( uMsg )
{
case WM_INITDIALOG:
return true;
break;

case WM_COMMAND:

switch( LOWORD( wParam ) )
{
case IDOK:
DestroyWindow( hwndDlg );
return true;
}
}

return( DefDlgProc( hwndDlg, uMsg, wParam, lParam ) );
}


This just causes the program to quit.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!