本文整理汇总了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 );
}
示例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));
}
示例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);
}
示例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);
}
示例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
}
示例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);
}
示例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);
}
示例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
}
示例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
}
示例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);
}
示例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;
}
示例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
}
示例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;
}
示例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();
}
示例15: OnClickedRadioLikelihood
void CProcessingOptions::OnClickedRadioLikelihood()
{
CEdit * ctrlEditCoverage = reinterpret_cast<CEdit *> (GetDlgItem(IDC_PERCENT_COVERAGE));
ctrlEditCoverage->EnableWindow(TRUE);
}