Ejemplo n.º 1
0
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);
}
Ejemplo n.º 2
0
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();
}
Ejemplo n.º 3
0
/* #FN#
   Sets up the state of the wizard controls */
void
/* #AS#
   Nothing */
CWizardDlg::
SetWizardState()
{
	CButton *pBack   = (CButton *)GetDlgItem( IDC_WIZARD_BACK );
	CButton *pNext   = (CButton *)GetDlgItem( IDC_WIZARD_NEXT );
	CButton *pFinish = (CButton *)GetDlgItem( IDC_WIZARD_FINISH );

	BOOL bFirst = (BOOL)(!m_nCurrentIndex);
	BOOL bLast  = (BOOL)(m_nCurrentIndex == m_arrPages.GetUpperBound());

	ASSERT(NULL != pBack && NULL != pNext && NULL != pFinish);

	pBack->EnableWindow( !bFirst );
	pNext->EnableWindow( !bLast );

	if( bLast )
	{
		SetDefID( IDC_WIZARD_FINISH );
		GotoDlgCtrl( pFinish );
	}
	else
	{
		SetDefID( IDC_WIZARD_NEXT );
		if( bFirst )
			GotoDlgCtrl( pNext );
	}
	/* Set wizard dialog title */
	m_strTitle.Format( IDS_WIZARD_TITLE, m_nCurrentIndex + 1, m_arrPages.GetUpperBound() != -1 ? m_arrPages.GetUpperBound() + 1 : 1 );
	SetWindowText( m_strTitle );

} /* #OF# CWizardDlg::SetWizardState */
Ejemplo n.º 4
0
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;
}
Ejemplo n.º 5
0
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);
*/
}
Ejemplo n.º 6
0
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;
			}
			*/
		}
	}
}
Ejemplo n.º 7
0
void    CProxyInfoDialog::switchOK()
{
    CButton *q = (CButton *)GetDlgItem( IDOK );
    if ( (m_proxyServerName.GetLength() > 0) && (m_proxyPortNumber > 0) )
        q->EnableWindow( TRUE );
    else
        q->EnableWindow( FALSE );
}
Ejemplo n.º 8
0
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);
}
Ejemplo n.º 9
0
void TestRunnerDlg::beRunning ()
{
    CButton *runButton = (CButton *)GetDlgItem (ID_RUN);
    CButton *closeButton = (CButton *)GetDlgItem (IDOK);

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

}
Ejemplo n.º 10
0
void TestRunnerDlg::beIdle ()
{
    CButton *runButton = (CButton *)GetDlgItem (ID_RUN);
    CButton *closeButton = (CButton *)GetDlgItem (IDOK);

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

}
Ejemplo n.º 11
0
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);

}
Ejemplo n.º 12
0
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;
}
Ejemplo n.º 13
0
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 );
    }
}
Ejemplo n.º 14
0
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);
}
Ejemplo n.º 15
0
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();
}
Ejemplo n.º 16
0
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 );
}
Ejemplo n.º 17
0
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);
}
VOID CMainDialog::OnShowWindowHandles()
{
	CButton *pHideWindowHandlesButton = (CButton *)GetDlgItem(IDHIDEWINDOWHANDLES);
	CButton *pShowWindowHandlesButton = (CButton *)GetDlgItem(IDSHOWWINDOWHANDLES);

	if (DriverLoaded)
	{
		UnloadDriver();
		DriverLoaded = FALSE;
	}

	pHideWindowHandlesButton->EnableWindow(TRUE);
	pShowWindowHandlesButton->EnableWindow(FALSE);

	
}
Ejemplo n.º 19
0
BOOL CxDlgVirtualNodeLogin::OnInitDialog() 
{
	CDialog::OnInitDialog();
	CButton* pButtonPrivate = (CButton*)GetDlgItem (IDC_MFC_CHECK1);
	pButtonPrivate->EnableWindow (m_bEnableCheck);
	m_cOK.EnableWindow (FALSE);    

	if (m_bAlter)
	{
		CString strTitle;
#ifdef	EDBC
		if (!strTitle.LoadString (IDS_ALTER_SERVERLOGIN_TITLE))
			strTitle = _T("Alter the Definition of Server");
#else
		if (!strTitle.LoadString (IDS_ALTER_NODELOGIN_TITLE))
			strTitle = _T("Alter the Definition of Virtual Node");
#endif
		CEdit* pEdit = (CEdit*)GetDlgItem (IDC_MFC_EDIT1);
		pEdit->SetReadOnly();
		pEdit->EnableWindow (FALSE);
		SetWindowText (strTitle);
		   m_strOldVNodeName    = m_strVNodeName;
		m_strOldUserName        = m_strUserName;
		m_strOldPassword        = _T("");
		m_strOldConfirmPassword = _T("");
		m_bOldPrivate           = m_bPrivate;
		CEdit* pEdit2 = (CEdit*)GetDlgItem (IDC_MFC_EDIT2);
		pEdit2->SetFocus();
		pEdit2->SetSel (0, -1);
		OnKillfocusPassword();
		return FALSE;
	}
	return TRUE;  // return TRUE unless you set the focus to a control
				  // EXCEPTION: OCX Property Pages should return FALSE
}
Ejemplo n.º 20
0
LRESULT CSaveArgs::OnNameChanged(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
{
	CEdit name = GetDlgItem(IDC_FILENAME);
	CButton ok = GetDlgItem(IDOK);
	ok.EnableWindow(name.GetWindowTextLength() > 0);
	return 0;
}
Ejemplo n.º 21
0
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 );
}
Ejemplo n.º 22
0
void CPPgNotify::LoadSettings(void)
{
    if (thePrefs.useDownloadNotifier)
        CheckDlgButton(IDC_CB_TBN_ONDOWNLOAD, BST_CHECKED);
    if (thePrefs.useNewDownloadNotifier)
        CheckDlgButton(IDC_CB_TBN_ONNEWDOWNLOAD, BST_CHECKED);
    if (thePrefs.useChatNotifier)
        CheckDlgButton(IDC_CB_TBN_ONCHAT, BST_CHECKED);
    if (thePrefs.useSoundInNotifier)
        CheckDlgButton(IDC_CB_TBN_USESOUND, BST_CHECKED);
    if (thePrefs.useLogNotifier)
        CheckDlgButton(IDC_CB_TBN_ONLOG, BST_CHECKED);
    if (thePrefs.notifierPopsEveryChatMsg)
        CheckDlgButton(IDC_CB_TBN_POP_ALWAYS, BST_CHECKED);
    if (thePrefs.notifierImportantError)
        CheckDlgButton(IDC_CB_TBN_IMPORTATNT, BST_CHECKED);
    if (thePrefs.notifierNewVersion)
        CheckDlgButton(IDC_CB_TBN_ONNEWVERSION, BST_CHECKED);

    CButton* btnPTR = (CButton*) GetDlgItem(IDC_CB_TBN_POP_ALWAYS);
    btnPTR->EnableWindow(IsDlgButtonChecked(IDC_CB_TBN_ONCHAT));
    CEdit* editPtr = (CEdit*) GetDlgItem(IDC_EDIT_TBN_WAVFILE);
    editPtr->SetWindowText(LPCTSTR(thePrefs.notifierSoundFilePath));
    GetDlgItem(IDC_EDIT_TBN_WAVFILE)->EnableWindow(IsDlgButtonChecked(IDC_CB_TBN_USESOUND));
    GetDlgItem(IDC_BTN_BROWSE_WAV)->EnableWindow(IsDlgButtonChecked(IDC_CB_TBN_USESOUND));
}
Ejemplo n.º 23
0
BOOL CFileSaveAsGraphicDlg::OnInitDialog()
{
   CFileDialog::OnInitDialog ();

	// don't allow editing of Image Size fields for "pmo" file type
	// ASSUMPTION: "*.pmo" is the default
	m_btnAspect.EnableWindow(FALSE);
	m_editWidth.EnableWindow(FALSE);
	m_editHeight.EnableWindow(FALSE);

	m_CategoryManager.Initialize(CPMWCollection::typeArt);

	// fill the Categories combo with current categories
	CStringArray categories;
	m_CategoryManager.GetUserCategories(categories);
	for (int i = 0; i < categories.GetSize(); i++)
		m_CategoryCombo.AddString(categories[i]);
	m_CategoryCombo.SetCurSel(0);	
	UpdateData(TRUE);

   if (!IsSelectedAvailable())
   {
      CButton  *pBtn = (CButton*)GetDlgItem(IDC_SAVE_2_SEL);
      if (pBtn)
         pBtn->EnableWindow(FALSE);
   }

   return TRUE;
}
Ejemplo n.º 24
0
BOOL CLicenseDlg::OnSetActive()
{
    if (!CheckWindowsVersion()) {
        CPropertyPage::EndDialog(IDCANCEL);
    }

    CPropertySheet* pSheet = (CPropertySheet*)GetParent();
    ASSERT_KINDOF(CPropertySheet, pSheet);
    if (m_FirstTime) {
        m_FirstTime = FALSE;

        //  Disable everything until the user scrolls the license text
        CButton *radio_all = (CButton *) GetDlgItem(IDC_DISAGREE);
        radio_all->SetCheck(1);
        CButton *understand = (CButton *) GetDlgItem(IDC_UNDERSTAND);
        understand->SetCheck(BST_UNCHECKED);
        OnUnderstand();
        understand->EnableWindow(FALSE);
        pSheet->SetWizardButtons(0);
        UpdateData(FALSE); // write to screen
    } else {
        pSheet->SetWizardButtons(PSWIZB_NEXT);
    }
    return CPropertyPage::OnSetActive();
}
Ejemplo n.º 25
0
LRESULT CAddSpecFuncDlg::OnBnClickCreate(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
{
	CButton wndCheck = GetDlgItem(IDC_CHECK_CREATE);
	CButton wndCheckAdd = GetDlgItem(IDC_CHECK_ADD_CREATE);
	bool bChecked = (wndCheck.GetCheck() == BST_CHECKED);

	if (!bChecked && m_bEnableCreate)
	{
		wndCheckAdd.SetCheck(BST_UNCHECKED);
		wndCheckAdd.EnableWindow(FALSE);
	}
	else
	{
		wndCheckAdd.EnableWindow();
	}
	return 0;
}
Ejemplo n.º 26
0
BOOL
COptions4Page::OnInitDialog() 
{
    CEdit *pEditOutput = (CEdit *)GetDlgItem(IDC_EDIT_OUTPUT_LOG);
    CEdit *pEditError = (CEdit *)GetDlgItem(IDC_EDIT_ERROR_LOG);
    CEdit *pEditOptions = (CEdit *)GetDlgItem(IDC_EDIT_OPTIONS_LOG);
    CEdit *pEditSQL = (CEdit *)GetDlgItem(IDC_EDIT_SQL_COPY);
    CButton *pButtonOutput = (CButton *)GetDlgItem(IDC_BUTTON_OUTFILE);
    CButton *pButtonError = (CButton *)GetDlgItem(IDC_BUTTON_ERRFILE);
    CButton *pButtonOptions = (CButton *)GetDlgItem(IDC_BUTTON_OPTFILE);
    CButton *pButtonSQL = (CButton *)GetDlgItem(IDC_BUTTON_SQLFILE);

    Message.LoadString(IDS_OPTIONS4_HEADING);
    SetDlgItemText(IDC_OPTIONS4_HEADING, Message);
    Message.LoadString(IDS_CHECK_OUTFILE);
    SetDlgItemText(IDC_CHECK_OUTFILE, Message);
    Message.LoadString(IDS_CHECK_ERRFILE);
    SetDlgItemText(IDC_CHECK_ERRFILE, Message);
    Message.LoadString(IDS_CHECK_OPTFILE);
    SetDlgItemText(IDC_CHECK_OPTFILE, Message);
    Message.LoadString(IDS_CHECK_SQLFILE);
    SetDlgItemText(IDC_CHECK_SQLFILE, Message);
    Message.LoadString(IDS_BUTTON_OUTFILE);
    SetDlgItemText(IDC_BUTTON_OUTFILE, Message);
    Message.LoadString(IDS_BUTTON_ERRFILE2);
    SetDlgItemText(IDC_BUTTON_ERRFILE, Message);
    Message.LoadString(IDS_BUTTON_OPTFILE);
    SetDlgItemText(IDC_BUTTON_OPTFILE, Message);
    Message.LoadString(IDS_BUTTON_SQLFILE);
    SetDlgItemText(IDC_BUTTON_SQLFILE, Message);

    pEditOutput->EnableWindow(FALSE);
    pEditError->EnableWindow(FALSE);
    pEditOptions->EnableWindow(FALSE);
    pEditSQL->EnableWindow(FALSE);
    pButtonOutput->EnableWindow(FALSE);
    pButtonError->EnableWindow(FALSE);
    pButtonOptions->EnableWindow(FALSE);
    pButtonSQL->EnableWindow(FALSE);

    OutputLog = ErrorLog = FALSE;

    CPropertyPage::OnInitDialog();	
	
    return TRUE;
}
Ejemplo n.º 27
0
void CMainPropertyPage::OnCheckExternalNewTab(WORD /*wNotifyCode*/, WORD /*wID*/, HWND hWndCtl)
{
	bool bCheck = CButton(GetDlgItem(IDC_CHECK_EXTERNALNEWTAB)).GetCheck() != 0;
	CButton btn = GetDlgItem(IDC_CHECK_EXTERNALNEWTABACTIVE);
	btn.EnableWindow(bCheck);
	if (bCheck == false)
		btn.SetCheck(FALSE);
}
Ejemplo n.º 28
0
Archivo: TT3Dlg.cpp Proyecto: 12019/TT3
void connlost(void *context, char *cause)
{
    CWnd *tA = theApp.GetMainWnd();

	// Disable pushbuttons
	CButton *pButton = (CButton*)tA->GetDlgItem(IDC_BUTTON1);
	pButton->EnableWindow(FALSE);
	pButton = (CButton*)tA->GetDlgItem(IDC_BUTTON2);
	pButton->EnableWindow(FALSE);
	pButton = (CButton*)tA->GetDlgItem(IDC_BUTTON3);
	pButton->EnableWindow(FALSE);
	CTT3Dlg *tA2 = (CTT3Dlg *)tA;
	tA2->MQTTConnected = FALSE;
	tA->SetDlgItemText(IDC_EDIT5, "Not connected");
	
	pMainDlg->PostMessageA(USER_1, 0, 0);
}
Ejemplo n.º 29
0
void CTexturePropDlg::EnableCheckBox(UINT id, BOOL bEnable)
{
	CButton *pButton;

	pButton = (CButton*)GetDlgItem(id);
	if( pButton )
		pButton->EnableWindow( bEnable );
}
Ejemplo n.º 30
0
LRESULT CAddSpecFuncDlg::OnBnClickDestroy(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
{
	CButton wndCheck = GetDlgItem(IDC_CHECK_DESTROY);
	CButton wndCheckAdd = GetDlgItem(IDC_CHECK_REMOVE_DESTROY);
	bool bChecked = (wndCheck.GetCheck() == BST_CHECKED);

	if (!bChecked && m_bEnableDestroy)
	{
		wndCheckAdd.SetCheck(BST_UNCHECKED);
		wndCheckAdd.EnableWindow(FALSE);
	}
	else
	{
		wndCheckAdd.EnableWindow();
	}
	return 0;
}