//------------------------------------------------------------------------- // create dialog //------------------------------------------------------------------------- Bool GWinDialog::ShowDialog(GWinControl* pOwner) { int DialogResult = IDCANCEL; // add dialog to list g_ActiveWinDialogs.Add( this ); // create dialog DialogResult = DialogBoxParam( GApp::g_HInstance, MAKEINTRESOURCE( DialogResource() ), pOwner->Hwnd(), GetDialogCallback(), (u32)this ); if ( DialogResult == -1 ) { GDebug::CheckWin32Error(); } // remove dialog from list int Index = g_ActiveWinDialogs.FindIndex(this); g_ActiveWinDialogs.RemoveAt( Index ); return (DialogResult == IDOK); }