HI I am create a mimic of the Windows Context menu.
Show dialog does the follow:
CreateDialogIndirectParamruns a message loop:
while ( ContinueModal() && GetMessage(&msg, NULL, 0, 0) )
{
TranslateMessage( &msg );
DispatchMessage( &msg );
}
I the dialog I look for lost focus event of the new window there I set the ContinueModel flag to false and call EndDialog / DestroyWindow.
EndDialog doesn't kill my dialog, DestroyWindow does. Is this ok, can anyone explain why?Thanks! D.
Like it says in the first line of the documentation, EndDialog ends modal dialogs. Your dialog is not modal, so EndDialog is the wrong function. The documentation for CreateDialogIndirectParam says
To destroy the dialog box, use the DestroyWindow function.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With