本文整理汇总了C++中OnCancel函数的典型用法代码示例。如果您正苦于以下问题:C++ OnCancel函数的具体用法?C++ OnCancel怎么用?C++ OnCancel使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了OnCancel函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnCancel
void CComSetDlg::OnBnClickedCancel()
{
// TODO: 在此添加控件通知处理程序代码
OnCancel();
}
示例2: OnCancel
void CDLGrename::OnBnClickedCancel()
{
// TODO: Add your control notification handler code here
OnCancel();
}
示例3: OnCancel
void CSaveDlg::OnBnClickedCancel()
{
if(pMC) pMC->Stop();
OnCancel();
}
示例4: OnCancel
void CChannelsDlg::cancel_clicked()
{
OnCancel();
}
示例5: OnCancel
void CDailyOpsBS::OnClose()
{
OnCancel();
}
示例6: OnCancel
void CNetOption::OnBnClickedCancel()
{
// TODO: 在此添加控件通知处理程序代码
OnCancel();
}
示例7: OnCancel
void CVNOCLoginDlg::OnBnClickedCancel()
{
OnCancel();
}
示例8: OnCancel
void CEventWizardDlg::OnBnClickedCancel()
{
OnCancel();
}
示例9: OnCancel
void CInputBox::OnBnClickedCancel()
{
// TODO: Add your control notification handler code here
OnCancel();
}
示例10: QDialog
RocketStorageSelectionDialog::RocketStorageSelectionDialog(RocketPlugin *plugin, MeshmoonStorage *storage, const QStringList &suffixFilters,
bool allowChangingFolder, MeshmoonStorageItem &startDirectory, QWidget *parent) :
QDialog(parent),
plugin_(plugin),
storage_(storage),
suffixFilters_(suffixFilters),
allowChangingFolder_(allowChangingFolder),
startDirectory_(startDirectory),
currentFolder_(0)
{
// Setup UI
ui_.setupUi(this);
ui_.scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
ui_.lineEditFilter->installEventFilter(this);
ui_.buttonSelect->setAutoDefault(false);
ui_.buttonCancel->setAutoDefault(false);
view_ = new RocketStorageListWidget(this, plugin_);
view_->SetPreviewFileOnMouse(true);
view_->setSelectionMode(QAbstractItemView::SingleSelection);
QVBoxLayout *l = new QVBoxLayout(ui_.scrollAreaWidgetContents);
l->setSpacing(0);
l->setContentsMargins(0,0,0,0);
l->addWidget(view_);
ui_.scrollAreaWidgetContents->setLayout(l);
// Connections
connect(view_, SIGNAL(itemClicked(QListWidgetItem*)), SLOT(OnItemClicked(QListWidgetItem*)));
connect(view_, SIGNAL(itemDoubleClicked(QListWidgetItem*)), SLOT(OnItemDoubleClicked(QListWidgetItem*)));
connect(ui_.buttonSelect, SIGNAL(clicked()), SLOT(OnSelect()), Qt::QueuedConnection);
connect(ui_.buttonCancel, SIGNAL(clicked()), SLOT(reject()), Qt::QueuedConnection);
connect(this, SIGNAL(rejected()), SLOT(OnCancel()));
connect(ui_.lineEditFilter, SIGNAL(textChanged(const QString&)), SLOT(OnFilterChanged(const QString&)));
// Dialog setup
setAttribute(Qt::WA_DeleteOnClose, true);
setWindowModality(parent != 0 ? Qt::WindowModal : Qt::ApplicationModal);
setWindowFlags(parent != 0 ? Qt::Tool : Qt::SplashScreen);
setWindowTitle(parent != 0 ? "Meshmoon Storage Picker" : "");
setModal(true);
// Center to main window or to parent window.
if (!parent)
{
plugin_->Notifications()->DimForeground();
plugin_->Notifications()->CenterToMainWindow(this);
}
else
plugin_->Notifications()->CenterToWindow(parent, this);
// Show and activate
show();
setFocus(Qt::ActiveWindowFocusReason);
activateWindow();
// If this is a splash dialog animate opacity
if (!parent)
{
setWindowOpacity(0.0);
QPropertyAnimation *showAnim = new QPropertyAnimation(this, "windowOpacity", this);
showAnim->setStartValue(0.0);
showAnim->setEndValue(1.0);
showAnim->setDuration(300);
showAnim->setEasingCurve(QEasingCurve(QEasingCurve::InOutQuad));
showAnim->start();
}
if (!plugin_ || !storage_)
{
view_->addItem(new QListWidgetItem("Failed to list storage content"));
return;
}
if (storage_->RootDirectory().IsNull())
view_->addItem(new QListWidgetItem("Loading..."));
MeshmoonStorageAuthenticationMonitor *auth = storage_->Authenticate();
connect(auth, SIGNAL(Completed()), SLOT(OnStorageAuthCompleted()), Qt::QueuedConnection);
connect(auth, SIGNAL(Canceled()), SLOT(reject()), Qt::QueuedConnection);
connect(auth, SIGNAL(Failed(const QString&)), SLOT(reject()), Qt::QueuedConnection);
}
示例11: OnCancel
HRESULT CTryData4Dlg::OnButtonCancel(IHTMLElement* /*pElement*/)
{
OnCancel();
return S_OK;
}
示例12: TEXT
BOOL CClassMgrDlg::OnInitDialog()
{
CDialog::OnInitDialog();
pDlg = reinterpret_cast<CConsoleDlg*>(AfxGetMainWnd());
((CEdit*)GetDlgItem(IDC_NAME))->LimitText(64);
((CEdit*)GetDlgItem(IDC_PATH))->LimitText(255);
m_lstClass.SetExtendedStyle(LVS_EX_FULLROWSELECT|LVS_EX_GRIDLINES);
m_lstClass.InsertColumn(0, TEXT("类别名称"), LVCFMT_LEFT, 90);
m_lstClass.InsertColumn(1, TEXT("游戏默认路径"), LVCFMT_LEFT, 240);
i8desk::CDbMgr* pDbMgr = reinterpret_cast<CConsoleDlg*>(AfxGetMainWnd())->m_pDbMgr;
i8desk::DefClassMap ClassInfos;
std::string ErrInfo;
if (!pDbMgr->GetAllClass(ClassInfos, ErrInfo))
{
AfxMessageBox(ErrInfo.c_str());
OnCancel();
return TRUE;
}
LPCSTR defGuid[] = {
CLASS_WL_GUID,
CLASS_DJ_GUID,
CLASS_XX_GUID,
CLASS_WY_GUID,
CLASS_DZ_GUID,
CLASS_QP_GUID,
CLASS_PL_GUID,
CLASS_LT_GUID,
CLASS_CY_GUID,
CLASS_YY_GUID,
CLASS_GP_GUID,
};
for (int idx=0; idx<_countof(defGuid); idx++)
{
i8desk::DefClassMapItr it = ClassInfos.find(defGuid[idx]);
if (it != ClassInfos.end())
{
int nItem = m_lstClass.InsertItem(m_lstClass.GetItemCount(), it->second->Name);
char *p = new char[it->first.size() + 1];
lstrcpy(p, it->first.c_str());
m_lstClass.SetItemData(nItem, reinterpret_cast<DWORD>(p));
m_lstClass.SetItemText(nItem, 1, it->second->Path);
}
}
for (i8desk::DefClassMapItr it = ClassInfos.begin();
it != ClassInfos.end(); it ++)
{
if (!i8desk::IsI8DeskClassGUID(it->first))
{
int nItem = m_lstClass.InsertItem(m_lstClass.GetItemCount(), it->second->Name);
char *p = new char[it->first.size() + 1];
lstrcpy(p, it->first.c_str());
m_lstClass.SetItemData(nItem, reinterpret_cast<DWORD>(p));
m_lstClass.SetItemText(nItem, 1, it->second->Path);
}
}
ClassInfos.clear();
if (m_lstClass.GetItemCount())
m_lstClass.SetItemState(0, LVIS_SELECTED|LVIS_FOCUSED, LVIS_SELECTED|LVIS_FOCUSED);
CenterWindow();
return TRUE;
}
示例13: OnCancel
void CJudgeDlg::OnOK()
{
OnCancel();
}
示例14: OnCancel
void CDlgBlockAnalysis::OnBnClickedSaveas2()
{
OnCancel();
}
示例15: OnCancel
bool NCDialog::EventChildKey( Win* child, cevent_key* pEvent )
{
if ( pEvent->Type() == EV_KEYDOWN )
{
//dbg_printf("key=0x%x\n",pEvent->Key());
if ( pEvent->Key() == VK_ESCAPE )
{
OnCancel();
return true;
}
if ( pEvent->Key() == VK_TAB )
{
if ( ( pEvent->Mod() & KM_SHIFT ) != 0 )
{
FocusPrevChild();
}
else
{
FocusNextChild();
}
return true;
}
// on UNIX shift-tab gives XK_ISO_Left_Tab
#ifdef XK_ISO_Left_Tab
else if ( pEvent->Key() == XK_ISO_Left_Tab )
{
FocusPrevChild();
return true;
}
#endif // XK_ISO_Left_Tab
else if ( pEvent->Key() == VK_RETURN || pEvent->Key() == VK_NUMPAD_RETURN )
{
if ( enterCmd && GetFocusButtonNum() < 0 )
{
CloseDialog( enterCmd );
return true;
}
}
else if ( pEvent->Key() == VK_LEFT || pEvent->Key() == VK_RIGHT )
{
int i = GetFocusButtonNum();
if ( i >= 0 )
{
int n;
if ( pEvent->Key() == VK_LEFT )
{
n = i ? i - 1 : _bList.count() - 1;
}
else
{
n = ( ( i + 1 ) % _bList.count() );
}
if ( n != i )
{
_bList[n]->SetFocus();
}
return true;
}
}
};
return Win::EventChildKey( child, pEvent );
}