void
ImageNameEditorForm::CreateMessage(String& str)
{
- if (__pMessageBox != null)
- {
- delete __pMessageBox;
- __pMessageBox = null;
- __modalMsgBoxResult = 0;
- }
-
- __pMessageBox = new(std::nothrow) MessageBox;
-
- if (__pMessageBox != null)
+ if (__pMessageBox == null)
{
- __pMessageBox->Construct(L"", str, MSGBOX_STYLE_OK, 3000);
- }
-
- if (__pMessageBox != null)
- {
- __pMessageBox->ShowAndWait(__modalMsgBoxResult);
+ __pMessageBox = new(std::nothrow) MessageBox;
if (__pMessageBox != null)
{
+ __pMessageBox->Construct(L"", str, MSGBOX_STYLE_OK, 3000);
+ __pMessageBox->ShowAndWait(__modalMsgBoxResult);
+
delete __pMessageBox;
__pMessageBox = null;
+ __modalMsgBoxResult = 0;
}
- __modalMsgBoxResult = 0;
}
-
- return;
}
void