本文整理汇总了C++中CloseDialog函数的典型用法代码示例。如果您正苦于以下问题:C++ CloseDialog函数的具体用法?C++ CloseDialog怎么用?C++ CloseDialog使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了CloseDialog函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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();
}
}
示例2: KillTimer
LRESULT CResendDlg::OnPopupExit(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
{
KillTimer(0);
CloseDialog(0);
return 0;
}
示例3: GetObjectPathForSave
void 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();
}
}
}
}
示例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
}
示例5: ERROR3
void 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 ();
}
}
示例6: CloseDialog
void 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);
}
示例7: CloseDialog
void wxTabNavigatorWindow::OnKeyUp(wxKeyEvent &event)
{
if(event.GetKeyCode() == WXK_CONTROL)
{
CloseDialog();
}
}
示例8: CloseDialog
void 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);
}
}
示例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;
}
}
示例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);
}
示例11: GetCursorPos
LRESULT 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;
}
示例12: switch
/*!
ボタンが押されたときの動作
*/
BOOL CDlgFileUpdateQuery::OnBnClicked(int id)
{
EFileUpdateQuery result;
switch( id ){
case IDC_BTN_RELOAD: // 再読込
result = EFUQ_RELOAD;
break;
case IDC_BTN_CLOSE: // 閉じる
result = EFUQ_CLOSE;
break;
case IDC_BTN_NOTIFYONLY: // 以後通知メッセージのみ
result = EFUQ_NOTIFYONLY;
break;
case IDC_BTN_NOSUPERVISION: // 以後更新を監視しない
result = EFUQ_NOSUPERVISION;
break;
case IDC_BTN_AUTOLOAD: // 以後未編集で再ロード
result = EFUQ_AUTOLOAD;
break;
default:
result = EFUQ_CLOSE;
break;
}
CloseDialog( (INT_PTR)result );
return 0;
}
示例13: CloseDialog
LRESULT CErrorReportDlg::OnPopupSendReportLater(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
{
g_CrashInfo.SetRemindPolicy(REMIND_LATER);
CloseDialog(wID);
return 0;
}
示例14: CloseDialog
FReply SAblAbilityPreviewAssetClassDlg::CancelClicked()
{
m_bOkClicked = false;
CloseDialog();
return FReply::Handled();
}
示例15: OnOK
void OnOK(HWND hWnd)
{
DoDataExchange(true);
winx::MsgBoxTrace(
_T("Check=%d, Sex=%d, Level=%d, Edit='%s'\n"),
m_fCheck1, m_nSex, m_nLevel, (LPCTSTR)m_strEdit1);
CloseDialog(hWnd);
}