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


C++ CButton::EnableWindow方法代码示例

本文整理汇总了C++中CButton::EnableWindow方法的典型用法代码示例。如果您正苦于以下问题:C++ CButton::EnableWindow方法的具体用法?C++ CButton::EnableWindow怎么用?C++ CButton::EnableWindow使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CButton的用法示例。


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

示例1: GetDlgItem

void
CDeviceAddWriteKeyDlg::OnWriteKeyChange(UINT /*wNotifyCode*/, int /*wID*/, HWND hWndCtl)
{
	CEdit wndWriteKey = hWndCtl;

	wndWriteKey.GetWindowText(
		m_strWriteKey.GetBuffer(NDAS_DEVICE_WRITE_KEY_LEN + 1),
		NDAS_DEVICE_WRITE_KEY_LEN + 1);

	m_strWriteKey.ReleaseBuffer();

	CButton wndOK = GetDlgItem(IDOK);
	if (m_strWriteKey.GetLength() == 5) 
	{
		BOOL fValid = ::NdasValidateStringIdKey(
			m_strDeviceId, 
			m_strWriteKey);
		wndOK.EnableWindow(fValid);
	}
	else 
	{
		wndOK.EnableWindow(FALSE);
	}

	SetMsgHandled(FALSE);
}
开发者ID:tigtigtig,项目名称:ndas4windows,代码行数:26,代码来源:devpropsh.cpp

示例2: MessageBox

void CoptimizerDlg::OnBnClickedButton1()
{
	CButton *OptimizeButton = (CButton*)GetDlgItem(IDC_BUTTON1);
	CButton *CancelButton = (CButton*)GetDlgItem(IDCANCEL);
	CProgressCtrl *ProgressBar = (CProgressCtrl*)GetDlgItem(IDC_PROGRESS);
	int RetVal;

	OptimizeButton->SetWindowText(TEXT("Please wait..."));
	OptimizeButton->EnableWindow(FALSE);
	CancelButton->EnableWindow(FALSE);

	ProgressBar->SetPos(0);
	OptimizeBoot(OptimizeButton);
#ifndef LDRONLY
	ProgressBar->SetPos(25);
	OptimizeRegistry(OptimizeButton);
	ProgressBar->SetPos(50);
	OptimizeLibraries(OptimizeButton);
	ProgressBar->SetPos(75);
	OptimizeSystem(OptimizeButton);
#endif
	ProgressBar->SetPos(100);

	OptimizeButton->SetWindowText(TEXT("Optimize!"));
	OptimizeButton->EnableWindow(TRUE);
	CancelButton->EnableWindow(TRUE);
	
	RetVal = MessageBox(TEXT("You need to reboot the system for the changes to take effect. Reboot now?"),
		TEXT("Done."), MB_OKCANCEL);

	if(RetVal == IDOK)
		Reboot();
	else
		InflictLoad();
}
开发者ID:DrAnon,项目名称:Optimizer,代码行数:35,代码来源:optimizerDlg.cpp

示例3: OnItemchangedListMessage

void CPPageMessage::OnItemchangedListMessage(NMHDR* /*pNMHDR*/, LRESULT* pResult)
{
    // IDE generated code - commented because it isn't needed at present.
    //NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;

    // If there is a selected item, then it makes sense to keep the "Edit" and
    // "Remove" buttons in enabled state.
    BOOL bToEnable = ((m_odMsgList.GetNextItem(-1, LVNI_SELECTED)) >= 0);

    CButton* pomButton = (CButton*) GetDlgItem(IDC_BUTTON_EDIT);
    if (pomButton != nullptr)
    {
        pomButton->EnableWindow(bToEnable);
    }

    if (m_bForDBMsg == FALSE)
    {
        pomButton = (CButton*) GetDlgItem(IDC_BUTTON_REMOVE);
        if (pomButton != nullptr)
        {
            pomButton->EnableWindow(bToEnable);
        }
    }

    *pResult = 0;
}
开发者ID:IXXAT-wucherer,项目名称:busmaster,代码行数:26,代码来源:PPageMessage.cpp

示例4: EnableControls

void CBidDialogSmall::EnableControls()
{
	// enable all controls
	for(int i=IDC_BID_LEVEL_1;i<=IDC_BID_LEVEL_7;i++)
	{
		CButton* pButton = (CButton*) GetDlgItem(i);
		pButton->EnableWindow(TRUE);
		pButton->SetState(FALSE);
	}

	for(i=IDC_SUIT_CLUBS;i<=IDC_SUIT_NOTRUMP;i++)
	{
		CButton* pButton = (CButton*) GetDlgItem(i);
		pButton->EnableWindow(TRUE);
		pButton->SetState(FALSE);
	}
/*
	// enable the level & suit buttons
	int nLastBid = pDOC->GetLastValidBid();
	if (nLastBid == BID_PASS)
	{
	}
	//	
	int nLevel = BID_LEVEL(nLastBid);
	int nSuit = BID_SUIT(nLastBid);

	// enable all suits higher than the one bid
	for(int i=0;i<nSuit;i++)
		GetDlgItem(IDC_SUIT_CLUBS+i)->EnableWindow(TRUE);
*/
}
开发者ID:derekmcloughlin,项目名称:easybridge,代码行数:31,代码来源:BidDlgSmall.cpp

示例5: OnLbnSelchangeListPage

void CShowPageDlg::OnLbnSelchangeListPage()
{
	// TODO: 在此添加控件通知处理程序代码
	int index = m_OwnerListBox.GetCurSel();
	if(index==CB_ERR)return;
	map<int,UINT>::const_iterator itera = m_map_index.find(index);
	if(itera!=m_map_index.end())
	{
		list<CTrackContrl*>::const_iterator trakItera = theApp.m_pView->m_list_trackCtrl.begin();
		for(trakItera;trakItera!=theApp.m_pView->m_list_trackCtrl.end();trakItera++)
		{
			CTrackContrl* ptrackCtr = *trakItera;
			if(ptrackCtr->GetSerialID()==itera->second && ptrackCtr->GetSerialID()==0)
			{
				CButton* pDelButton = (CButton*)GetDlgItem(IDC_BN_DELPAGE);
				pDelButton->EnableWindow(FALSE);
// 				if(theApp.m_pView->m_pTrackCtrl!=NULL)
// 					theApp.m_pView->m_pTrackCtrl->SetAllCtrlHide();//原来的隐藏
// 				theApp.m_pView->m_pTrackCtrl = ptrackCtr;
// 				theApp.m_pView->m_pTrackCtrl->SetAllCtrlShow();
				theApp.m_pView->ShowPage(ptrackCtr->GetSerialID());
//				theApp.m_pView->Invalidate(TRUE);
				break;
			}
			else if(ptrackCtr->GetSerialID()==itera->second && ptrackCtr->GetSerialID()!=0)
			{
				theApp.m_pView->ShowPage(ptrackCtr->GetSerialID());
				CButton* pDelButton = (CButton*)GetDlgItem(IDC_BN_DELPAGE);
				pDelButton->EnableWindow(TRUE);
// 				if(theApp.m_pView->m_pTrackCtrl!=NULL)
// 					theApp.m_pView->m_pTrackCtrl->SetAllCtrlHide();//原来的隐藏
// 				theApp.m_pView->m_pTrackCtrl = ptrackCtr;
// 				theApp.m_pView->m_pTrackCtrl->SetAllCtrlShow();
// 				theApp.m_pView->Invalidate(TRUE);
				break;
			}
			/*
			if(ptrackCtr->GetSerialID()==0)//主页面不能删除
			{
				CButton* pDelButton = (CButton*)GetDlgItem(IDC_BN_DELPAGE);
				pDelButton->EnableWindow(FALSE);
			}
			else
			{
				CButton* pDelButton = (CButton*)GetDlgItem(IDC_BN_DELPAGE);
				pDelButton->EnableWindow(TRUE);
			}
			if(ptrackCtr->GetSerialID()==itera->second)
			{
				theApp.m_pView->m_pTrackCtrl->SetAllCtrlHide();//原来的隐藏
				theApp.m_pView->m_pTrackCtrl = ptrackCtr;
				theApp.m_pView->m_pTrackCtrl->SetAllCtrlShow();
				theApp.m_pView->Invalidate(TRUE);
				break;
			}
			*/
		}
	}
}
开发者ID:Forlearngit,项目名称:HallQueFront,代码行数:59,代码来源:ShowPageDlg.cpp

示例6:

void    CProxyInfoDialog::switchOK()
{
    CButton *q = (CButton *)GetDlgItem( IDOK );
    if ( (m_proxyServerName.GetLength() > 0) && (m_proxyPortNumber > 0) )
        q->EnableWindow( TRUE );
    else
        q->EnableWindow( FALSE );
}
开发者ID:tsupo,项目名称:blogolee,代码行数:8,代码来源:ProxyInfoDialog.cpp

示例7: toggleTimeLapseUI

void CMainDlg::toggleTimeLapseUI(bool timeLapsing)
{
	CButton stopTimeLapseButton = (CButton)GetDlgItem(IDC_STOP_TIMELAPSE_BUTTON);
	CButton startTimeLapseButton = (CButton)GetDlgItem(IDC_START_TIMELAPSE_BUTTON);
	CButton takePictureButton = (CButton)GetDlgItem(ID_TAKE_PICTURE);
	stopTimeLapseButton.EnableWindow(timeLapsing);
	startTimeLapseButton.EnableWindow(!timeLapsing);
	takePictureButton.EnableWindow(!timeLapsing);
}
开发者ID:alprema,项目名称:FreeMoteDSLR,代码行数:9,代码来源:MainDlg.cpp

示例8: beRunning

void TestRunnerDlg::beRunning ()
{
    CButton *runButton = (CButton *)GetDlgItem (ID_RUN);
    CButton *closeButton = (CButton *)GetDlgItem (IDOK);

    runButton->EnableWindow (FALSE);
    closeButton->EnableWindow (FALSE);

}
开发者ID:beneon,项目名称:MITK,代码行数:9,代码来源:TestRunnerDlg.cpp

示例9: beIdle

void TestRunnerDlg::beIdle ()
{
    CButton *runButton = (CButton *)GetDlgItem (ID_RUN);
    CButton *closeButton = (CButton *)GetDlgItem (IDOK);

    runButton->EnableWindow (TRUE);
    closeButton->EnableWindow (TRUE);

}
开发者ID:beneon,项目名称:MITK,代码行数:9,代码来源:TestRunnerDlg.cpp

示例10: beRunDisabled

void TestRunnerDlg::beRunDisabled ()
{
    CButton *runButton = (CButton *)GetDlgItem (ID_RUN);
    CButton *closeButton = (CButton *)GetDlgItem (IDOK);
    CButton *stopButton = (CButton *)GetDlgItem (ID_STOP);

    runButton->EnableWindow (FALSE);
    stopButton->EnableWindow (FALSE);
    closeButton->EnableWindow (TRUE);

}
开发者ID:beneon,项目名称:MITK,代码行数:11,代码来源:TestRunnerDlg.cpp

示例11: OnBnClickedAddSetmskBt

void CAddCamDlg::OnBnClickedAddSetmskBt()
{
	// TODO: 在此添加控件通知处理程序代码
	mRangeIndex = 0;
	char filepath[256];
	Mat mMat;
	CString FilePathName;
	CFileDialog dlg(TRUE, //TRUE为OPEN对话框,FALSE为SAVE AS对话框
		NULL,
		NULL,
		OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
		(LPCTSTR)_TEXT("JPG Files (*.jpg)|*.jpg|BMP Files (*.bmp)|*.bmp|"),
		NULL);
	if (dlg.DoModal() == IDOK)
	{

		FilePathName = dlg.GetPathName(); //文件名保存在了FilePathName里
		CCommonFunc::UnicodeToAnsi(FilePathName.GetBuffer(), filepath, 256);
		mMat = imread(filepath);
		if(mMat.empty()) return;
		cv::Size mSize = cv::Size(mImgRect.Width(), mImgRect.Height());
		Mat image2 = Mat(mSize, CV_32S);
		resize(mMat, image2, mSize);
		CvImage::Mat2CImage(image2, mimg);
		if (mimg.IsNull())
		{
			CButton* pBt = (CButton*)GetDlgItem(IDC_ADD_REDRAW_BT);
			pBt->EnableWindow(FALSE);
			pBt = (CButton*)GetDlgItem(IDC_ADD_ADDRANGE_BT);
			pBt->EnableWindow(FALSE);
			isDrawImg = false;
			return;
		}
		int nBPP = mMat.channels()*8;
		if (!maskimg.IsNull()) maskimg.Destroy();
		maskimg.Create(mMat.cols, mMat.rows,nBPP );
		CButton* pBt = (CButton*)GetDlgItem(IDC_ADD_REDRAW_BT);
		pBt->EnableWindow(TRUE);
		pBt = (CButton*)GetDlgItem(IDC_ADD_ADDRANGE_BT);
		pBt->EnableWindow(TRUE);
		mRangeIndex = 0;
		for (int i = 0; i < MAX_RANGE_NUM; i++)
		{
			mWarnRange[i].clear();
		}
	}
	else
	{
		return;
	}
	DrawImg();
	isDrawImg = true;
}
开发者ID:ping28198,项目名称:TMTVision,代码行数:53,代码来源:AddCamDlg.cpp

示例12: OnShowWindow

void CDeleteTagsDialog::OnShowWindow(BOOL bShow, UINT nStatus) 
{
    CDialog::OnShowWindow(bShow, nStatus);

    if ( bShow ) {
        CButton *p = (CButton *)GetDlgItem( IDC_BUTTON_GET_TAGS );
        p->EnableWindow( FALSE );

        p = (CButton *)GetDlgItem( IDOK );
        p->EnableWindow( FALSE );
    }
}
开发者ID:tsupo,项目名称:bookey,代码行数:12,代码来源:DeleteTagsDialog.cpp

示例13: _SetVerifyState

void CVNOCLoginDlg::_SetVerifyState( BOOL bVerifying )
{
	m_bVerifying = bVerifying;
	CEdit* pEditun = (CEdit*)GetDlgItem(IDC_LoginDlg_EDIT_USERNAME);	ATLASSERT(pEditun);
	CEdit* pEditpw = (CEdit*)GetDlgItem(IDC_LoginDlg_EDIT_PWD);			ATLASSERT(pEditpw);
	CButton* pBtnrp = (CButton*)GetDlgItem(IDC_LoginDlg_CHECKBOX_R);		ATLASSERT(pBtnrp);
	CButton* pBtnLogin = (CButton*)GetDlgItem(IDOK);						ATLASSERT(pBtnLogin);

	pEditun->EnableWindow(!bVerifying);
	pEditpw->EnableWindow(!bVerifying);
	pBtnrp->EnableWindow(!bVerifying);
	pBtnLogin->EnableWindow(!bVerifying);
}
开发者ID:AngryPowman,项目名称:vnoc,代码行数:13,代码来源:VNOCLoginDlg.cpp

示例14: OnEdit

void CWSPrintDialog::OnEdit()
{
	CButton *pCheck = (CButton *)GetDlgItem( 1041 );
	CString sText;
	CEdit *pNumber = (CEdit *)GetDlgItem( 1154 );
		pNumber->GetWindowText(sText);

	int iCopies = _ttoi(sText);	
	if(iCopies > 1)
		pCheck->EnableWindow(TRUE);	
	else
		pCheck->EnableWindow(FALSE);
	m_bCollate = pCheck->GetCheck();
}
开发者ID:killbug2004,项目名称:WSProf,代码行数:14,代码来源:WSPrintDialog.cpp

示例15: OnSelchangeComboDeleteTaglist

void CDeleteTagsDialog::OnSelchangeComboDeleteTaglist() 
{
    int     location = m_tagList.GetCurSel();
    CButton *p = (CButton *)GetDlgItem( IDOK );

    if ( location == LB_ERR ) {
        p->EnableWindow( FALSE );
        return;
    }

	m_tagList.GetLBText( location, m_tag );
    m_tagIndex = location;

    p->EnableWindow( TRUE );
}
开发者ID:tsupo,项目名称:bookey,代码行数:15,代码来源:DeleteTagsDialog.cpp


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