
modal dialog to modal less
Quote:
> Hi, is it possible to convert the certain Modal Dialog to Modal less
> dialog, if I know the HWND of this certain window?
The opposite (you have a modeless dialog which can work like a modal)
is easy:
// Simulates toggling between modal and modeless
// for a dialog that is originally created as modeless.
// Pass TRUE to set Modal, FALSE to set back to Modeless.
void CYourDialog::GoModal(BOOL bModal)
{
// Disables/enables the Application's main frame window
// and all children (Menus, toolbars, dialogs, views etc...).
AfxGetMainWnd()->EnableWindow(!bModal);
if (!bModal)
return;
// If this dialog is going modal then we must re-enable this
// dialog so that we can still use it.
EnableWindow(TRUE);
Quote:
}
HTH