Single Modeless Dialog
-
I know how to add a modal and modeless dialog to pop up. What I can't find is how do you have a modeless window pop open and not allow the user to continue to open new windows?
.h
private:
MyDialog *mDialog;.cpp
mDialog = new MyDialog(this);
mDialog->show(); -
hi and welcome
with new windows, you mean another copy of Mydialog?
you could test with
if (mDialog!=NULL && mDialog->isVisible() ) return;set mDialog =NULL in constructor.
-
Thanks, but that causes the .exe to crash
-
did you set mDialog=NULL; at constructor?
else it just has random value and u will crash.