当前位置: 首页>>代码示例>>C++>>正文


C++ OnCancel函数代码示例

本文整理汇总了C++中OnCancel函数的典型用法代码示例。如果您正苦于以下问题:C++ OnCancel函数的具体用法?C++ OnCancel怎么用?C++ OnCancel使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了OnCancel函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: OnCancel

void CComSetDlg::OnBnClickedCancel()
{
	// TODO: 在此添加控件通知处理程序代码
	OnCancel();
}
开发者ID:youxidonxx,项目名称:MTSW,代码行数:5,代码来源:ComSetDlg.cpp

示例2: OnCancel

void CDLGrename::OnBnClickedCancel()
{
	// TODO: Add your control notification handler code here
	OnCancel();
}
开发者ID:a1324yn,项目名称:zogvm,代码行数:5,代码来源:DLGrename.cpp

示例3: OnCancel

void CSaveDlg::OnBnClickedCancel()
{
	if(pMC) pMC->Stop();

	OnCancel();
}
开发者ID:Strongc,项目名称:playasa,代码行数:6,代码来源:SaveDlg.cpp

示例4: OnCancel

void CChannelsDlg::cancel_clicked()
{
   OnCancel();
}
开发者ID:Heathcode,项目名称:nesicide,代码行数:4,代码来源:ChannelsDlg.cpp

示例5: OnCancel

void CDailyOpsBS::OnClose() 
{
	OnCancel();
}
开发者ID:ems,项目名称:TMS,代码行数:4,代码来源:DailyOpsBS.cpp

示例6: OnCancel

void CNetOption::OnBnClickedCancel()
{
	// TODO: 在此添加控件通知处理程序代码
	OnCancel();
}
开发者ID:1514louluo,项目名称:acl,代码行数:5,代码来源:NetOption.cpp

示例7: OnCancel

void CVNOCLoginDlg::OnBnClickedCancel()
{
	OnCancel();
}
开发者ID:AngryPowman,项目名称:vnoc,代码行数:4,代码来源:VNOCLoginDlg.cpp

示例8: OnCancel

void CEventWizardDlg::OnBnClickedCancel()
{
	OnCancel();
}
开发者ID:aolko,项目名称:construct,代码行数:4,代码来源:Event+Wizard+Dlg.cpp

示例9: OnCancel

void CInputBox::OnBnClickedCancel()
{
    // TODO: Add your control notification handler code here
    OnCancel();
}
开发者ID:viticm,项目名称:pap2,代码行数:5,代码来源:InputBox.cpp

示例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);
}
开发者ID:Adminotech,项目名称:meshmoon-plugins,代码行数:83,代码来源:MeshmoonStorageDialogs.cpp

示例11: OnCancel

HRESULT CTryData4Dlg::OnButtonCancel(IHTMLElement* /*pElement*/)
{
	OnCancel();
	return S_OK;
}
开发者ID:Biotron,项目名称:kpgweigher,代码行数:5,代码来源:TryData4Dlg.cpp

示例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;
}
开发者ID:lubing521,项目名称:important-files,代码行数:70,代码来源:ClassMgrDlg.cpp

示例13: OnCancel

void CJudgeDlg::OnOK()
{
	OnCancel();
}
开发者ID:donkey3456,项目名称:BacilusDetect,代码行数:4,代码来源:JudgeDlg.cpp

示例14: OnCancel

void CDlgBlockAnalysis::OnBnClickedSaveas2()
{
	OnCancel();
}
开发者ID:hefen1,项目名称:XCaimi,代码行数:4,代码来源:DlgBlockAnalysis.cpp

示例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 );
}
开发者ID:FaionWeb,项目名称:WCMCommander,代码行数:72,代码来源:ncdialogs.cpp


注:本文中的OnCancel函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。