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


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

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


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

示例1: ShowCurrentStatus

void TwitterAuthSelectDialog::ShowCurrentStatus( bool rescan /* = FALSE */ )
{
    CButton *bp = (CButton *)GetDlgItem( IDC_BUTTON_GET_TOKEN );
    bp->EnableWindow( m_useOAuth );

    bp = (CButton *)GetDlgItem( IDC_RADIO_OAUTH );
    bp->SetCheck( m_useOAuth ? 1 : 0 );

    bp = (CButton *)GetDlgItem( IDC_RADIO_BASIC );
    bp->SetCheck( m_useBASIC ? 1 : 0 );

    CString status;
    CStatic *sp = (CStatic *)GetDlgItem( IDC_TOKEN_STATUS );
    if ( (m_oauthToken.GetLength()       > 0) &&
         (m_oauthTokenSecret.GetLength() > 0)    )
	    status.LoadString( IDS_ACCESSTOKEN_ACQUIRED );
    else
	    status.LoadString( IDS_ACCESSTOKEN_UNTAKEN );
    sp->SetWindowText( status );

    CEdit   *p = (CEdit *)GetDlgItem(IDC_EDIT_USERNAME);
    if ( rescan )
        p->GetWindowText( m_username );
    p->SetWindowText( m_username );
    p->EnableWindow( m_useBASIC );

    p = (CEdit *)GetDlgItem(IDC_EDIT_PASSWORD);
    if ( rescan )
        p->GetWindowText( m_password );
    p->SetWindowText( m_password );
    p->EnableWindow( m_useBASIC );
}
开发者ID:SATOSHI-G,项目名称:Chirrup,代码行数:32,代码来源:TwitterAuthSelectDialog.cpp

示例2: RefreshDialog

void WFXEdit::RefreshDialog()
{
  CEdit *chkctrl;

  SetWindowText("Edit wave effect: "+itemname);
  chkctrl = (CEdit *) GetDlgItem(IDC_VOLUME);  
  chkctrl->EnableWindow(!!(the_wfx.header.flags&WFX_VOLUME));
  chkctrl = (CEdit *) GetDlgItem(IDC_FREQUENCY);  
  chkctrl->EnableWindow(!!(the_wfx.header.flags&WFX_FREQUENCY));
  chkctrl = (CEdit *) GetDlgItem(IDC_RADIUS);  
  chkctrl->EnableWindow(!!(the_wfx.header.flags&WFX_SRCURVE));
}
开发者ID:TeoTwawki,项目名称:dltcep,代码行数:12,代码来源:WFXEdit.cpp

示例3: _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

示例4: OnBnClickedCheckSet

void CRasterPropShowPage::OnBnClickedCheckSet()
{
	CButton* pCheck =(CButton*)GetDlgItem(IDC_CHECK_SET);

	CEdit* pEdit = (CEdit*)GetDlgItem(IDC_EDIT_INVALIDVAL);

	if(BST_UNCHECKED == pCheck->GetCheck())
	{
		pEdit->EnableWindow(false);		                              
	}
	else
		pEdit->EnableWindow(true);

	UpdateChannelStaticInfo(m_comboBand.GetCurSel()+1);
}
开发者ID:lozpeng,项目名称:applesales,代码行数:15,代码来源:RasterPropShowPage.cpp

示例5: OnInitDialog

BOOL PropCodepage::OnInitDialog() 
{
	theApp.TranslateDialog(m_hWnd);
	CPropertyPage::OnInitDialog();
	
	CEdit * pEdit = (CEdit *) GetDlgItem(IDC_CUSTOM_CP_NUMBER);

	// Enable/disable "Custom codepage" edit field
	if (IsDlgButtonChecked(IDC_CP_CUSTOM))
		pEdit->EnableWindow(TRUE);
	else
		pEdit->EnableWindow(FALSE);

	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
开发者ID:YueLinHo,项目名称:WinMerge,代码行数:16,代码来源:PropCodepage.cpp

示例6: SetByteBitState

void dialogEditor_dataitem::SetByteBitState(BOOL bState)
{
	CSpinButtonCtrl* pSpin = NULL;
	if((pSpin = (CSpinButtonCtrl*)GetDlgItem(IDC_EDITOR_DATAITEM_SPINBYTE)) == NULL)
		return;
	pSpin->EnableWindow(bState);
	if((pSpin = (CSpinButtonCtrl*)GetDlgItem(IDC_EDITOR_DATAITEM_SPINBIT)) == NULL)
		return;
	pSpin->EnableWindow(bState);
	CEdit* pEdit = NULL;
	if((pEdit = (CEdit*)GetDlgItem(IDC_EDITOR_DATAITEM_BYTE)) == NULL)
		return;
	pEdit->EnableWindow(bState);
	if((pEdit = (CEdit*)GetDlgItem(IDC_EDITOR_DATAITEM_BIT)) == NULL)
		return;
	pEdit->EnableWindow(bState);
}
开发者ID:DimeSPb,项目名称:ecuExplorer,代码行数:17,代码来源:dialogEditor_dataitem.cpp

示例7: SetAddressState

void dialogEditor_dataitem::SetAddressState(BOOL bState)
{
	CEdit* pEdit = NULL;
	if((pEdit = (CEdit*)GetDlgItem(IDC_EDITOR_DATAITEM_ADDRESSHIGH)) == NULL)
		return;
	pEdit->EnableWindow(bState);
	CSpinButtonCtrl* pSpin = NULL;
	if((pSpin = (CSpinButtonCtrl*)GetDlgItem(IDC_EDITOR_DATAITEM_ADDRESSHIGHSPIN)) == NULL)
		return;
	pSpin->EnableWindow(bState);
}
开发者ID:DimeSPb,项目名称:ecuExplorer,代码行数:11,代码来源:dialogEditor_dataitem.cpp

示例8: OnInitDialog

BOOL CEdgeTab::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	CButton* pButton = (CButton*)GetDlgItem(IDC_NETWORK_EDGE_CHECK);
	CComboBox* pCombo = (CComboBox*)GetDlgItem(IDC_COMBO);
	CEdit* pEdit = (CEdit*)GetDlgItem(IDC_WEIGHT_EDIT);
	pButton->EnableWindow(m_bEmptyE);
	pCombo->EnableWindow(m_bEmptyE);
	pCombo->SetCurSel(m_lpControlStruct->edgeType);
	if (m_lpControlStruct->edgeType == None) {
		pEdit->EnableWindow(FALSE);
		pButton->EnableWindow(FALSE);	
	}
	else{
		pEdit->EnableWindow(TRUE);
		pEdit->SetWindowText(m_lpControlStruct->defaultWeightOfEdge);
	}
	GetDlgItem(IDC_CAPACITY_EDIT)->EnableWindow(pButton->GetCheck() == 1);
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
开发者ID:dark2bright,项目名称:beng-thesis,代码行数:23,代码来源:EdgeTab.cpp

示例9: OnInitDialog

BOOL CChangePasDlg::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	if (m_First)
	{
		SetWindowText("Задание начального пароля");
		CEdit *Ed = (CEdit *)GetDlgItem(IDC_PWDOLD);
		Ed->EnableWindow(false);
		Ed = (CEdit *)GetDlgItem(IDC_PWDNEW);
		Ed->SetFocus();
	}
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
开发者ID:laz65,项目名称:internet,代码行数:16,代码来源:ChangePasDlg.cpp

示例10: OnRadioDeleteRecycle

void CSchedule::OnRadioDeleteRecycle() 
{
	// TODO: Add your control notification handler code here
	
	CEdit *pEdit;
	CButton *pButton;

	m_ScheduleInfo.ulDeleteObjectType = DELETE_OBJECT_RECYCLER;

	pEdit = (CEdit *)GetDlgItem(IDC_FILE_PATH);
	pEdit->EnableWindow(FALSE);
	pButton = (CButton *)GetDlgItem(IDC_REFER);
	pButton->EnableWindow(FALSE);
	pButton = (CButton *)GetDlgItem(IDC_CHECK_LOG);
	pButton->EnableWindow(FALSE);
}
开发者ID:xfxf123444,项目名称:japan,代码行数:16,代码来源:Schedule.cpp

示例11: OnEnableSaveCheckboxClicked

LRESULT CMainDlg::OnEnableSaveCheckboxClicked(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
{
	CButton enableSaveCheckBox = (CButton)GetDlgItem(IDC_ENABLE_SAVE_CHECKBOX);
	CEdit targetEdit = (CEdit)GetDlgItem(IDC_TARGET_EDIT);
	CButton browseButton = (CButton)GetDlgItem(IDC_BROWSE_BUTTON);
	
	bool isChecked = enableSaveCheckBox.GetCheck();
	targetEdit.EnableWindow(isChecked);
	browseButton.EnableWindow(isChecked);
	if (isChecked)
	{
		selectPath();
	} else {
		callback_handler_->SetDownloadTarget(NULL);
	}
	return 0;
}
开发者ID:alprema,项目名称:FreeMoteDSLR,代码行数:17,代码来源:MainDlg.cpp

示例12: OnInitDialog

BOOL CPropPageTargetGeneral::OnInitDialog() 
{
	CDialog::OnInitDialog();

    FillCombos();

    CheckCommChannels();

    // if properties dialog, disable name edit
    if(!m_bNewDlg)
    {
        CEdit*   pEdit = (CEdit*)GetDlgItem(IDC_PROPGEN_NAME);
        pEdit->EnableWindow(FALSE);
    }

	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
开发者ID:LM25TTD,项目名称:ATCMcontrol_Engineering,代码行数:18,代码来源:PropPageTargetGeneral.cpp

示例13: OnInitDialog

BOOL CWSPrintDialog::OnInitDialog()
{
	bool bShowPrintRedlineOptions = Workshare::OptionApi::GetBool( L"ShowPrintRedlineOptions");
	CButton *pButton;
	pButton = (CButton*)GetDlgItem(IDC_CHECK_BW);
	if( bShowPrintRedlineOptions)
	{
		pButton->SetCheck(m_bBlackAndWhite);
	}
	else
	{
		pButton->ShowWindow( SW_HIDE);
	}

	pButton = (CButton*)GetDlgItem(IDC_CHECK_CHANGES);
	if( bShowPrintRedlineOptions)
	{
		pButton->SetCheck(m_bChangesOnly);
	}
	else
	{
		pButton->ShowWindow(SW_HIDE);
	}

	// resize the control to 3 times the width
	CRect rcIcon;
	GetDlgItem(1086)->GetWindowRect(rcIcon);

	GetDlgItem(1086)->SetWindowPos(&wndTop, 0, 0, 2+rcIcon.Width()*3, 2+rcIcon.Height(), SWP_NOMOVE);

	CEdit *pEdit = (CEdit *)GetDlgItem(1154);
	pEdit->EnableWindow(TRUE);	

	CButton *pCheck = (CButton *)GetDlgItem( 1041 );
	m_bCollate = pCheck->GetCheck();

	CButton *pCheckPrintToFile = (CButton *)GetDlgItem( 1040 );
	pCheckPrintToFile->SetCheck(FALSE);

	return TRUE;
}
开发者ID:killbug2004,项目名称:WSProf,代码行数:41,代码来源:WSPrintDialog.cpp

示例14: CreateCtrl

void CModifyDlg::CreateCtrl()
{
	CRect rcClient;
	GetClientRect(&rcClient);
	int top = rcClient.top + TOPINCREMENT;
	int Left = rcClient.left + LEFTINCREMENT;
	CRect CTRRECT;

	if (PUBLIC == m_tableType || INCODE == m_tableType){
		for (int i = 0;i < m_vHead.size();i++){
			CStatic *Static = new CStatic;
			CTRRECT = SetCtrlPos(Left,top,88,CTRLHEIGHT);
			Static->Create(m_vHead[i],WS_CHILD|WS_VISIBLE,CTRRECT,this);
			Static->SetFont(GetFont());
			Left += 88 + HINCREMENT;
			CEdit *Edit = new CEdit;
			CTRRECT = SetCtrlPos(Left,top - 3,380,EDITHEIGHT);
			Edit->Create(WS_CHILD|WS_VISIBLE|WS_TABSTOP|WS_BORDER|ES_MULTILINE|ES_AUTOVSCROLL,CTRRECT,this,IDC_MODIFY_EDIT);
			Edit->SetFont(GetFont());
			Edit->SetWindowText(m_vData[i]);
			top += VINCREMENT + CTRLHEIGHT ;
			Left = rcClient.left + LEFTINCREMENT;

			if (i == 0){
				Static->EnableWindow(FALSE);
				Edit->EnableWindow(FALSE);
			}
			if (i == m_vHead.size()-1 && INCODE == m_tableType)
			{
				CStatic *Static1 = new CStatic;
				CTRRECT = SetCtrlPos(Left,top,450,CTRLHEIGHT);
				Static1->Create("调度规则 1:最大空闲时间调度 2:最短会话时间调度 3:最高优先级调度",WS_CHILD|WS_VISIBLE,CTRRECT,this);
				Static1->SetFont(GetFont());
				m_StaticObject.push_back(Static1);
			}
			m_StaticObject.push_back(Static);
			m_EidtObject.push_back(Edit);
		}
	}
	if (TP == m_tableType) SetTPRuleCtrl();
}
开发者ID:obabywawa,项目名称:UPIM,代码行数:41,代码来源:ModifyDlg.cpp

示例15: OnClickedRadioLikelihood

void CProcessingOptions::OnClickedRadioLikelihood()
{
	CEdit * ctrlEditCoverage = reinterpret_cast<CEdit *> (GetDlgItem(IDC_PERCENT_COVERAGE));
	ctrlEditCoverage->EnableWindow(TRUE);
}
开发者ID:stanathong,项目名称:fiducial_mark_detector,代码行数:5,代码来源:ProcessingOptions.cpp


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