View Single Post
  #4   Spotlight this post!  
Unread 27-12-2004, 22:15
rbayer's Avatar Unsung FIRST Hero
rbayer rbayer is offline
Blood, Sweat, and Code
no team (Teamless Orphan)
 
Join Date: Mar 2002
Rookie Year: 2001
Location: Minnetonka, MN
Posts: 1,087
rbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of light
Send a message via AIM to rbayer
Re: win32 dialog help

There's any number of things that could be going wrong, but my guess would be that the dialog is being created, but not shown.

One thing I noticed was that you grab the WM_INITDIALOG message in AboutDialog, but don't do anything with it. If you don't process a given message, your handler routine should return FALSE to signify to windows that it should use the default behavior, which in this case involves painting the window to the screen, etc. Try changing the last line of your handler to "return FALSE;" and putting a "return TRUE;" after both of the EndDialog(...) calls. For example, here's the aboutDialog callback routine that I use in RoboGUI:
Code:
 BOOL CALLBACK aboutProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam){
 	switch(message){
 	case WM_COMMAND:
 		switch(LOWORD(wParam)){
 		case IDOK:
 		case IDCANCEL:
 			EndDialog(hDlg, 0);
 			return TRUE;
 		}
 		break;
 	}
 	return FALSE;
 }
If that doesn't work, could you post the entire VC++ project (zipped)? Make sure to delete the Debug and Release directories first... they tend to be quite large.
__________________
New C-based RoboEmu2 (code simulator) available at: http://www.robbayer.com/software.php