ÕâÆª½Ì³ÌC++ CloseDialogº¯Êý´úÂëʾÀýдµÃºÜʵÓã¬Ï£ÍûÄܰﵽÄú¡£
±¾ÎÄÕûÀí»ã×ÜÁËC++ÖÐCloseDialogº¯ÊýµÄµäÐÍÓ÷¨´úÂëʾÀý¡£Èç¹ûÄúÕý¿àÓÚÒÔÏÂÎÊÌ⣺C++ CloseDialogº¯ÊýµÄ¾ßÌåÓ÷¨£¿C++ CloseDialogÔõôÓã¿C++ CloseDialogʹÓõÄÀý×Ó£¿ÄÇô¹§Ï²Äú, ÕâÀᆱѡµÄº¯Êý´úÂëʾÀý»òÐí¿ÉÒÔΪÄúÌṩ°ïÖú¡£ ÔÚÏÂÎÄÖÐÒ»¹²Õ¹Ê¾ÁËCloseDialogº¯ÊýµÄ26¸ö´úÂëʾÀý£¬ÕâЩÀý×ÓĬÈϸù¾ÝÊÜ»¶Ó³Ì¶ÈÅÅÐò¡£Äú¿ÉÒÔΪϲ»¶»òÕ߸оõÓÐÓõĴúÂëµãÔÞ£¬ÄúµÄÆÀ¼Û½«ÓÐÖúÓÚÎÒÃǵÄÏµÍ³ÍÆ¼ö³ö¸ü°ôµÄC++´úÂëʾÀý¡£ ʾÀý1: CloseDialog// ----------------------------------------------------------------------------void BrowseSelector::OnKeyUp(wxKeyEvent &event)// ----------------------------------------------------------------------------{ //FIXME: the key should dynamically match the menuitem cmdkey if( event.GetKeyCode() == WXK_ALT ) { CloseDialog(); } if( event.GetKeyCode() == WXK_RETURN ) { CloseDialog(); }}
¿ª·¢ÕßID:DowerChest£¬ÏîÄ¿Ãû³Æ:codeblocks£¬´úÂëÐÐÊý:14£¬
ʾÀý2: KillTimerLRESULT CResendDlg::OnPopupExit(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/){ KillTimer(0); CloseDialog(0); return 0;}
¿ª·¢ÕßID:doo£¬ÏîÄ¿Ãû³Æ:CrashRpt£¬´úÂëÐÐÊý:7£¬
ʾÀý3: GetObjectPathForSavevoid SAssetDialog::CommitObjectPathForSave(){ if ( ensure(DialogType == EAssetDialogType::Save) ) { if ( bLastInputValidityCheckSuccessful ) { const FString ObjectPath = GetObjectPathForSave(); bool bProceedWithSave = true; // If we were asked to warn on existing assets, do it now if ( ExistingAssetPolicy == ESaveAssetDialogExistingAssetPolicy::AllowButWarn ) { FAssetRegistryModule& AssetRegistryModule = FModuleManager::LoadModuleChecked<FAssetRegistryModule>("AssetRegistry"); FAssetData ExistingAsset = AssetRegistryModule.Get().GetAssetByObjectPath(FName(*ObjectPath)); if ( ExistingAsset.IsValid() && AssetClassNames.Contains(ExistingAsset.AssetClass) ) { EAppReturnType::Type ShouldReplace = FMessageDialog::Open( EAppMsgType::YesNo, FText::Format(LOCTEXT("ReplaceAssetMessage", "{ExistingAsset} already exists. Do you want to replace it?"), FText::FromString(CurrentlyEnteredAssetName)) ); bProceedWithSave = (ShouldReplace == EAppReturnType::Yes); } } if ( bProceedWithSave ) { OnObjectPathChosenForSave.ExecuteIfBound(ObjectPath); CloseDialog(); } } }}
¿ª·¢ÕßID:1vanK£¬ÏîÄ¿Ãû³Æ:AHRUnrealEngine£¬´úÂëÐÐÊý:30£¬
ʾÀý4: SetTitleTypeString//-----------------------------------------------------------------------------//!//-----------------------------------------------------------------------------void tSearchItemDialog::Initialize( tMCoord position, const FindType::eItemType type, const tMapFilter& filter ){ m_NotificationID = 0; SetTitleTypeString( type ); UpdateStatusString(""); QVBoxLayout* pMainLayout = new QVBoxLayout(); pMainLayout->setContentsMargins( 0, 0, 0, 0 ); m_pSearchItemWidget = new tSearchItemWidget( this, m_pBrandFactory, position, filter ); Connect( m_pSearchItemWidget, SIGNAL( UpdateStatusString( const QString& ) ), this, SLOT( UpdateStatusString( const QString& ) ) ); Connect( m_pSearchItemWidget, SIGNAL( CloseDialog() ), this, SLOT( accept() ) ); pMainLayout->addWidget( m_pSearchItemWidget ); setLayout( pMainLayout ); if ( HasSoftKeyBar() ) { tAction* pShowAct = new tAction( tr( "Show", "[button]" ), this ); Connect( pShowAct, SIGNAL( triggered() ), this, SLOT( ShowPressed() ) ); tAction* pGotoAct = new tAction( tr( "Goto", "[button]" ), this ); Connect( pGotoAct, SIGNAL( triggered() ), this, SLOT( GotoPressed() ) ); tAction* pDetailsAct = new tAction( tr( "Details", "[button]" ), this ); Connect( pDetailsAct, SIGNAL( triggered() ), this, SLOT( DetailsPressed() ) ); m_ActionList << pShowAct << pGotoAct << pDetailsAct; setSoftKeys( m_ActionList ); } m_pSearchItemWidget->SetSearchType( type ); // starts the search}
¿ª·¢ÕßID:dulton£¬ÏîÄ¿Ãû³Æ:53_hero£¬´úÂëÐÐÊý:37£¬
ʾÀý5: ERROR3void CBrushGadget::HandleBrushButtonClick (BrushData* AppliedBrush, AttrBrushType* pBrush, AttrBrushType* pOrigBrush){ if (AppliedBrush == NULL || pBrush == NULL) { ERROR3("Invalid input parameters"); return; } if (!(IsDialogOpen ())) { pDialog_m = new CBrushEditDlg(); BOOL bMany = FALSE, bAllSameType = TRUE; //CProfileBiasGain* appliedBiasGain = GetProfileFromSelection (ProfileGadgetID, &bMany, &bAllSameType); //if (bAllSameType != FALSE) //{ pDialog_m->InvokeVia (*(this), AppliedBrush, pBrush, pOrigBrush, bMany); //} } else { CloseDialog (); }}
¿ª·¢ÕßID:Amadiro£¬ÏîÄ¿Ãû³Æ:xara-cairo£¬´úÂëÐÐÊý:25£¬
ʾÀý6: CloseDialogvoid vmsWinInetHttpTrafficCollector::OnInternetCloseHandle(HINTERNET hInternet){ if (!hInternet) return; m_pHttpTraffic->LockDialogsLists (true); CloseDialog (hInternet); for (size_t i = 0; i < m_pHttpTraffic->m_vCompletedDialogs.size (); i++) { if (m_pHttpTraffic->m_vCompletedDialogs [i]->hWInetFile == hInternet) m_pHttpTraffic->m_vCompletedDialogs [i]->hWInetFile = NULL; } m_pHttpTraffic->LockDialogsLists (false); EnterCriticalSection (&m_cs_vPostData); int nIndex = findPostDataIndex (hInternet); if (nIndex != -1) m_vPostData.erase (m_vPostData.begin () + nIndex); LeaveCriticalSection (&m_cs_vPostData); EnterCriticalSection (&m_cs_vNonCacheHandles); nIndex = findNonCacheHandleIndex (hInternet); if (nIndex != -1) m_vNonCacheHandles.erase (m_vNonCacheHandles.begin () + nIndex); LeaveCriticalSection (&m_cs_vNonCacheHandles);}
¿ª·¢ÕßID:pedia£¬ÏîÄ¿Ãû³Æ:raidget£¬´úÂëÐÐÊý:29£¬
ʾÀý7: CloseDialogvoid wxTabNavigatorWindow::OnKeyUp(wxKeyEvent &event){ if(event.GetKeyCode() == WXK_CONTROL) { CloseDialog(); }}
¿ª·¢ÕßID:05storm26£¬ÏîÄ¿Ãû³Æ:codelite£¬´úÂëÐÐÊý:7£¬
ʾÀý8: CloseDialogvoid CMainDlg::OnTimer(UINT_PTR nIDEvent){ if (nIDEvent == 1 && gStop) { static boost::timer tmr; // ÑÓ³Ù3Ãë¹Ø±Õ if (tmr.elapsed() > 3) { // ¼ì²â¹Ø±Õ trayIcon.Hide(); CloseDialog(0); TerminateProcess(GetCurrentProcess(), 0); } } else if (nIDEvent == 2 && exiting && !gStop) { static int times = 0; if (times < 3) { times++; // L"ÕýÔÚÍ˳ö̫һ£¬ÇëÉÔºò.." trayIcon.SetBalloonDetails(GetLocalWStr(strTrayNowExiting), L"", CTrayNotifyIcon::None, 100); } } else { SetMsgHandled(false); }}
¿ª·¢ÕßID:lcfGitHubCode£¬ÏîÄ¿Ãû³Æ:TaiyiCode£¬´úÂëÐÐÊý:29£¬
ʾÀý9: if//=================================================================================================void Controls::Event(GuiEvent e){ if(e == GuiEvent_Show || e == GuiEvent_WindowResize) { if(e == GuiEvent_Show) { visible = true; changed = false; } pos = global_pos = (GUI.wnd_size - size)/2; for(int i=0; i<2; ++i) bts[i].global_pos = global_pos + bts[i].pos; grid.Move(global_pos); } else if(e == GuiEvent_LostFocus) grid.LostFocus(); else if(e == GuiEvent_Close) { grid.LostFocus(); visible = false; } else if(e == Button_Ok) { if(changed) game->SaveGameKeys(); CloseDialog(); } else if(e == Button_Reset) { game->ResetGameKeys(); changed = true; }}
¿ª·¢ÕßID:edeksumo£¬ÏîÄ¿Ãû³Æ:carpg£¬´úÂëÐÐÊý:34£¬
ʾÀý10: OnOK void OnOK(HWND hWnd) { winx::SaveFileDialog dlg( _T("TIFF files(*.tif;*.tiff)/0*.tif;*.tiff/0"), _T("*.tif")); if (IDOK != dlg.DoModal()) return; TCHAR szFrame[] = _T("Frame1"); USES_CONVERSION; CLSID clsid; Gdiplus::GetEncoderClsid(L"image/tiff", &clsid); Gdiplus::MultiFrameImageCreator multi(T2CW(dlg.lpstrFile), clsid); for (UINT i = 1; i < 10; ++i) { szFrame[5] = '0' + i; ::SetDlgItemText(hWnd, IDC_PROMPT, szFrame); HBITMAP hbm = winx::ScreenCapture(hWnd); { Gdiplus::Bitmap bitmap(hbm, NULL); WINX_ASSERT(bitmap.GetLastStatus() == Gdiplus::Ok); multi.Add(bitmap); } ::DeleteObject(hbm); } CloseDialog(hWnd); }
¿ª·¢ÕßID:Chingliu£¬ÏîÄ¿Ãû³Æ:winx£¬´úÂëÐÐÊý:30£¬
ʾÀý11: GetCursorPosLRESULT CErrorReportDlg::OnCancel(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/){ // Show popup menu on "Other actions..." button click if(g_CrashInfo.m_bQueueEnabled) { CPoint pt; GetCursorPos(&pt); CMenu menu = LoadMenu(_Module.GetResourceInstance(), MAKEINTRESOURCE(IDR_POPUPMENU)); CMenu submenu = menu.GetSubMenu(4); strconv_t strconv; CString sSendLater = Utility::GetINIString(g_CrashInfo.m_sLangFileName, _T("MainDlg"), _T("SendReportLater")); CString sCloseTheProgram = Utility::GetINIString(g_CrashInfo.m_sLangFileName, _T("MainDlg"), _T("CloseTheProgram")); MENUITEMINFO mii; memset(&mii, 0, sizeof(MENUITEMINFO)); mii.cbSize = sizeof(MENUITEMINFO); mii.fMask = MIIM_STRING; mii.dwTypeData = sSendLater.GetBuffer(0); submenu.SetMenuItemInfo(ID_MENU5_SENDREPORTLATER, FALSE, &mii); mii.dwTypeData = sCloseTheProgram.GetBuffer(0); submenu.SetMenuItemInfo(ID_MENU5_CLOSETHEPROGRAM, FALSE, &mii); submenu.TrackPopupMenu(0, pt.x, pt.y, m_hWnd); } else { // Close dialog CloseDialog(wID); } return 0;}
¿ª·¢ÕßID:doo£¬ÏîÄ¿Ãû³Æ:CrashRpt£¬´úÂëÐÐÊý:35£¬
|