Dialog will not close
My dialog will not close here is the msg handler and the resource.
Excerpt from the resource:
// FUNCTIONS //////////////////////////////////////////////
BOOL CALLBACK PeerToPeerDialogProc(HWND hDlg,UINT msg,WPARAM wparam,LPARAM lparam)
switch( LOWORD(wparam) )
EndDialog( hDlg, 0 );
Finally the call to the dialog
IDD_DIALOGPEERTOPEER DIALOG DISCARDABLE 0, 0, 356, 196
STYLE WS_CHILD | WS_CAPTION
FONT 8, "MS Sans Serif"
LTEXT "Peer to Peer Connection Dialog",IDC_STATIC,126,4,100,8
LTEXT "Resource Dialog Test",IDC_STATIC,25,20,73,12
if (KEY_DOWN(VK_BACK) || keyboard_state[DIK_BACK])
IDOK certainly will not close. You aren't calling EndDialog() in it. Is that what you mean?
since the BUTTON has IDCANCEL won't it send this message to the dialog when pressed or does it send IDOK?
Anyhow doesn't hitting escape send IDCANCEL to the dialog procedure.
Both these attempts do not close the dialog.
In fact it doesn't respond to pressing the button at all.
oh, you don't have an OK button. I see. Well then you should probably remove the case.
I don't see a problem off hand. Have you debugged? Set a break point at the IDCANCEL location and see if you hit it.
I think I need the IDOK because when you hit enter the defaultbutton issues IDOK if it has focus and if you hit esc it isuues IDCANCEL according to Petzold (unless I misunderstood).
Anyhow I don't know how to use the debugger and just spent the last hour trying.
The program appears to freeze after displaying the dialog, no response, the button doesn't depress. I think I need to upload the code and provide a link, but I am feeling to lazy to look up the info about my isp webspace. Is there any free hosting for source code problems like this available?
I changed the style of the dialog box from child to overlapped, now everything seems to be working and I can continue on.
Does anybody know what the style child for a dialogbox entails. I thought it just meant child window or somthing. Whatever it was it was causing my program to hang.
Shwew and I was consider giving up, while still in the learning phase.
My app allows you to set a flag for full screen/windowed.
The windowed app is overlapped with an overlapped dialog.
The full screen is popup with overlapped dialog.
I am experiencing near the same problem with the full screen as as I was having with the child dialog.
This time after the dialog closes and I show the hidden full screen pop up window it doesn't seem to have focus, no input nothing.
I think this is due to it being popup because the other version(windowed not full screen) works fine.
Any remarks? If it is focus how do I regain focus to my full screen window?