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


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

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


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

示例1: OnActivate

void CFindItemDlg::OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized)
{
	CDialog::OnActivate(nState, pWndOther, bMinimized);
	if(CSettingsSM::GetInstance()->GetDefaultSearchDirection() == DefaultSearchDir_UP)
	{
		CButton* checkbtn = (CButton*)GetDlgItem(IDC_CHECK3);
		if(checkbtn)
		{
			checkbtn->SetCheck(1);
		}
	}
	else
	{
		CButton* checkbtn = (CButton*)GetDlgItem(IDC_CHECK4);
		if(checkbtn)
		{
			checkbtn->SetCheck(1);
		}
	}
	CButton* checkbtnMatchEx = (CButton*)GetDlgItem(IDC_CHECK1);
	if(checkbtnMatchEx && CSettingsSM::GetInstance()->MatchExact())
	{
		checkbtnMatchEx->SetCheck(1);
	}
	CEdit* e = (CEdit*)GetDlgItem(IDC_EDIT_KEYWORD);
	if(e)
	{
		std::wstring wstr = CSettingsSM::GetInstance()->GetUserString();
		m_KeywordStringValue.SetString(wstr.c_str());
		e->SetWindowTextW(m_KeywordStringValue);
		e->SetFocus();
		e->SetSel(0,-1);
		e->SetSel(-1);
	}
}
开发者ID:akhileshzmishra,项目名称:Excel-comparion-tool,代码行数:35,代码来源:FindItemDlg.cpp

示例2: OnInitDialog

/**
	@brief	

	@author BHK	

	@date 2009-06-09 오후 2:39:55	

	@param	

	@return		
*/
BOOL CControlCableCreationDlg::OnInitDialog()
{
	CDialog::OnInitDialog();

	CELoadDocData& docData = CELoadDocData::GetInstance();
	CProjectSettingTable* pSettingTable = (CProjectSettingTable*)docData.GetTableOf(CProjectSettingTable::GetTableName());
	if(pSettingTable)
	{
		m_nLoadControlCableRadio = atoi(pSettingTable->m_RecordEntry[0].FieldValueMap[_T("C_LOAD_CONTROL_CABLE_RADIO")].c_str());
		if(0 == m_nLoadControlCableRadio)
		{
			CButton* pButton = (CButton*)GetDlgItem(IDC_RADIO_ALL_CONTROL_CABLE);
			if(pButton) pButton->SetCheck(TRUE);
		}
		else
		{
			CButton* pButton = (CButton*)GetDlgItem(IDC_RADIO_UNSIZED_CONTROL_CABLE_ONLY);
			if(pButton) pButton->SetCheck(TRUE);
		}
		UpdateData(FALSE);

		const string rDesignLength = pSettingTable->m_RecordEntry[0].FieldValueMap[_T("C_DCS_IO_TYPE_DESIGN_LENGTH")];
		SetDlgItemText(IDC_EDIT_DCS_DESIGN_LENGTH , rDesignLength.c_str());
	}

	return TRUE;  // return TRUE unless you set the focus to a control
	// EXCEPTION: OCX Property Pages should return FALSE
}
开发者ID:radtek,项目名称:e-load,代码行数:39,代码来源:ControlCableCreationDlg.cpp

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

示例4: OnStop

// 停止
void CTabSample::OnStop(void)
{
	CButton* iconbutton = NULL;
	CStatic* iconstatic = NULL;
	CButton* pButton = NULL;

	iconstatic =(CStatic*)this->GetDlgItem(IDC_STATIC_LAUX);
	iconstatic->SetIcon(m_iconLAUXDisconnected);
	iconstatic = NULL;

	for (int i=0; i<GraphViewNum; i++)
	{
		ProcessMessages();
		iconbutton = (CButton*)this->GetDlgItem(m_iButtonIDFDU[i]);
		iconbutton->SetIcon(m_iconFDUDisconnected);
		iconbutton = NULL;
		pButton = (CButton*)GetDlgItem(m_iCheckIDInstrumentFDU[i]);
		pButton->SetCheck(0);
		pButton = NULL;
		pButton = (CButton*)GetDlgItem(m_iCheckIDNoiseFDU[i]);
		pButton->SetCheck(0);
		pButton = NULL;
	}
	delete iconstatic;
	delete iconbutton;
	delete pButton;

	GetDlgItem(IDC_EDIT_SENDPORT)->EnableWindow(TRUE);
	GetDlgItem(IDC_CHECK_HEARTBEAT)->EnableWindow(FALSE);
}
开发者ID:liquanhai,项目名称:cxm-hitech-matrix428,代码行数:31,代码来源:TabSample.cpp

示例5: initChecks

/////////////////////////////////////////////////////////////////////////////
// set up stuff, turn things on and off
/////////////////////////////////////////////////////////////////////////////
void CNetworkAIDialog::initChecks()
{
	int i, j;
	CButton *pCheck;
	CString str;

	//traverse controls
	for(i = 0; i < AI_DATABASE->numAI(); i++)
	{
		//set variables
		pCheck = &m_AI1Check + i;

		//set checkbox text
		str.Format("Use %s", AI_DATABASE->getAIName(i));
		pCheck->SetWindowText(str);

		//see if it's already being used
		for(j = 0; j < (int) GAME->m_players.size(); j++)
		{
			//find it
			if(GAME->m_players[j].m_player.getID() == AI_DATABASE->getAIID(i))
			{
				pCheck->SetCheck(TRUE);
			}
			else
			{
				pCheck->SetCheck(FALSE);
			}
		}
	}
}
开发者ID:saladyears,项目名称:Sea3D,代码行数:34,代码来源:NetworkAIDialog.cpp

示例6: OnInitDialog

/////////////////////////////////////////////////////////////////////////////
// set initial checkboxes
/////////////////////////////////////////////////////////////////////////////
BOOL CNetworkMessageDialog::OnInitDialog() 
{
	int i;
	CButton *pButton;

	CHelpDialog::OnInitDialog();

	//help system
	m_strHelp = HELP_SYSMESS;
	
	//run through the list and turn on checks
	for(i = 0; i < SYS_NOTIFY_SIZE; i++)
	{
		pButton = &m_Check1 + i;

		if(GAME->m_iSysNotify & (1 << i))
		{
			pButton->SetCheck(TRUE);
		}
		else
		{
			pButton->SetCheck(FALSE);
		}
	}
	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
开发者ID:saladyears,项目名称:Sea3D,代码行数:31,代码来源:NetworkMessageDialog.cpp

示例7:

bool	CFolderSet::Initial()
{
	CComboBox* pComboPack = (CComboBox*)GetDlgItem(IDC_COMBO_PACKAGE_TYPE);	
	if( pComboPack == NULL)	return false;
	pComboPack->Clear();
	itTypeInfo it = m_PackageSets.begin();
	for(;it != m_PackageSets.end();it++)
	{
		pComboPack->AddString( (*it).strFileName.c_str());
	}
	UpdatePackSet();
	CButton* pForcePack = (CButton*)GetDlgItem(IDC_CHECK_FORCE_MODIFY_PACKTYPE);
	if(pForcePack)
		pForcePack->SetCheck(m_bForceModifyPackType);

	CComboBox* pComboCompress= (CComboBox*)GetDlgItem(IDC_COMBO_COMPRESS_TYPE);
	if(pComboCompress == NULL)	return false;
	pComboCompress->Clear();
	it = m_CompresSets.begin();
	for(;it != m_CompresSets.end();it++)
	{
		pComboCompress->AddString( (*it).strFileName.c_str());
	}
	UpdateCompressSet();
	CButton* pForceCompress = (CButton*)GetDlgItem(IDC_CHECK_FORCE_MODIFY_COMPRESSTYPE);
	if(pForceCompress)
		pForceCompress->SetCheck(m_bForceModifyCompressType);
	return true;
}
开发者ID:ueverything,项目名称:mmo-resourse,代码行数:29,代码来源:FolderSet.cpp

示例8: OnInitDialog

BOOL CFindDialog::OnInitDialog() 
{
	CFindReplaceDialog::OnInitDialog();

	CEdit* pEdit = (CEdit *)GetDlgItem(IDC_FIND_EDIT);
	if(pEdit)
		pEdit->SetWindowText(m_csSearchStr);

	CButton* pChk = (CButton *)GetDlgItem(IDC_MATCH_CASE);
	if(pChk)
		pChk->SetCheck(m_bMatchCase);

	pChk = (CButton *)GetDlgItem(IDC_MATCH_WHOLE_WORD);
	if(pChk)
		pChk->SetCheck(m_bMatchWholeWord);

	pChk = (CButton *)GetDlgItem(IDC_WRAP_AROUND);	
	if(pChk)
		pChk->SetCheck(m_bWrapAround);

	pChk = (CButton *)GetDlgItem(IDC_SEARCH_BACKWARDS);
	if(pChk)
		pChk->SetCheck(m_bSearchBackwards);

	return TRUE; 
}
开发者ID:EdgarChen,项目名称:mozilla-cvs-history,代码行数:26,代码来源:Dialogs.cpp

示例9: LoadFromReg

void CConfigDlg::LoadFromReg()
{
    SelectPlaylist();

    CButton *shuffle = (CButton*)GetDlgItem( IDC_CHECK_SHUFFLE );
    shuffle->SetCheck( (((bool)m_reg[_T("Shuffle")])?BST_CHECKED:BST_UNCHECKED) );

	m_secondsSlider.SetPos( m_reg[_T("IncreaseTime")] );
	m_increase.SetCheck( (((bool)m_reg[_T("IncreaseVolume")]) ? BST_CHECKED : BST_UNCHECKED) );
	OnBnClickedIncreaseCheck();

    ((CButton*)GetDlgItem(IDC_DO_MUTE))->SetCheck( (((bool)m_reg[_T("MuteOnReturn")]) ? BST_CHECKED : BST_UNCHECKED) );

    ((CButton*)GetDlgItem(IDC_ENABLE_SNOOZE))->SetCheck( (((bool)m_reg[_T("EnableSnooze")]) ? BST_CHECKED : BST_UNCHECKED) );
    OnBnClickedEnableSnooze();

    CButton *runatstartup = (CButton*)GetDlgItem( IDC_STARTUP_CHECK );
    RegMap t(HKEY_CURRENT_USER);
    t = t[_T("Software")][_T("Microsoft")][_T("Windows")][_T("CurrentVersion")][_T("Run")];
    runatstartup->SetCheck( ((t.has_key(_T("iSnooze")))?BST_CHECKED:BST_UNCHECKED) );

    long st = 0xff & (long)m_reg[_T("SnoozeTime")];
    if( st < 1 ) st = 1; if( st > 60 ) st = 60;
    TCHAR tm[4];
    _stprintf( tm, _T("%d"), st );
    GetDlgItem(IDC_SNOOZE_TIME)->SetWindowText( tm );

    m_minimize.SetCheck( (((bool)m_reg[_T("MinimizeOnAlarm")])?BST_CHECKED:BST_UNCHECKED) );

	//LoadTimeFromReg();
	LoadAlarmsFromReg();
	FillAlarmsList();
	SetTimeDlg();
}
开发者ID:codingismy11to7,项目名称:iSnooze,代码行数:34,代码来源:ConfigDlg.cpp

示例10: OnInitDialog

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

	// Set the icon for this dialog.  The framework does this automatically
	//  when the application's main window is not a dialog
	SetIcon(m_hIcon, TRUE);			// Set big icon
	SetIcon(m_hIcon, FALSE);		// Set small icon

	// TODO: Add extra initialization here

  CButton* pServerTcp = (CButton*)GetDlgItem(IDC_SERVER_TCP);
  pServerTcp->SetCheck(true);

  CEdit* pServerPort = (CEdit*)GetDlgItem(IDC_SERVER_PORT);
  pServerPort->SetWindowText(CString("12345"));

  CButton* pClientTcp = (CButton*)GetDlgItem(IDC_CLIENT_TCP);
  pClientTcp->SetCheck(true);

  CEdit* pHost = (CEdit*)GetDlgItem(IDC_HOST);
  pHost->SetWindowText(CString("localhost"));

  CEdit* pPort = (CEdit*)GetDlgItem(IDC_PORT);
  pPort->SetWindowText(CString("12345"));

  CEdit* pTimeout = (CEdit*)GetDlgItem(IDC_TIMEOUT);
  pTimeout->SetWindowText(CString("1"));

  CButton* pSendDeliveryConfirmation = (CButton*)GetDlgItem(IDC_SEND_DELIVERY_CONFIRMATION);
  pSendDeliveryConfirmation->SetCheck(BST_CHECKED);

  return TRUE;  // return TRUE  unless you set the focus to a control
}
开发者ID:rushad,项目名称:newshub,代码行数:34,代码来源:newshubuiDlg.cpp

示例11: OnInitDialog

BOOL CLogin::OnInitDialog()
{
	CDialog::OnInitDialog();
	
	CWinApp* pApp = AfxGetApp();

	//determine range of accounts in history.
	//range begins at 1 and ends at and includes latest.  Bing: "latest" is actually the count for previous logins.
	//
	//in this case, if 0 is the latest, then there is no history
	//and thus, don't do anything.

	UINT latest = pApp->GetProfileInt("History", "Latest", 0);

	m_ListBox.SetExtendedStyle( m_ListBox.GetExtendedStyle() | LVS_EX_FULLROWSELECT );
	m_ListBox.InsertColumn(0, "Name", LVCFMT_LEFT, 75);
	m_ListBox.InsertColumn(1, "Zone", LVCFMT_LEFT, 75);
	m_ListBox.InsertColumn(2, "Server Host", LVCFMT_LEFT, 110);
	m_ListBox.InsertColumn(3, "Port", LVCFMT_LEFT, 75);

	for(UINT i = 1; i <= latest; i++)
	{
		FillBoxes(i, true);
	}

	int count = m_ListBox.GetItemCount();

	if(count > 0)
	{
		VERIFY(m_ListBox.SetItemState(count-1, 0xFFFFFFFF, LVIS_SELECTED));
	}

	// set the last login
	int last_login = pApp->GetProfileInt("History", "LastLogin", 0);
	if(last_login == 0) /* no last login */
	{
		if(latest > 0)
		{
			last_login = latest;
		}
	}
	if(last_login > 0)
	{
		FillBoxes(last_login, false);
	}

	CButton *cbox = (CButton *)GetDlgItem(IDC_CHECK_PRELOGINS);
	if(pApp->GetProfileInt("ShowPreviousLogins", "YesNo", 1) == 0)
	{
		cbox->SetCheck(BST_UNCHECKED);
	}
	else
	{
		cbox->SetCheck(BST_CHECKED);
	}
	OnBnClickedCheckPrelogins();

	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
开发者ID:DICE-UNC,项目名称:iRODS-FUSE-Mod,代码行数:60,代码来源:Login.cpp

示例12: UpdateDialogData

/////////////////////////////////////////////////////////////////////////////
// CMouse message handlers
void CMouse::UpdateDialogData()
{
    TCHAR TCValue[MAX_KEYVALUELEN];

    m_invert=bInvert;

//  UpdateData(FALSE);

    CButton* pCheck;
    pCheck = (CButton*) GetDlgItem(IDC_INVERT);

    if(pCheck!=NULL)
    {
        if(bInvert)
            pCheck->SetCheck(1);
        else
            pCheck->SetCheck(0);
    }

    m_mousexscale.SetPos(iMouselookXscale);
    m_mouseyscale.SetPos(iMouselookYscale);

    sprintf(TCValue,"%d",iMouselookXscale);
    SetDlgItemText(IDC_MOUSEXSCALEVALUE,TCValue);
    sprintf(TCValue,"%d",iMouselookYscale);
    SetDlgItemText(IDC_MOUSEYSCALEVALUE,TCValue);
}
开发者ID:bowlofstew,项目名称:Meridian59,代码行数:29,代码来源:Mouse.cpp

示例13: OnInitDialog

BOOL CDlgRazmGroup::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	CButton *b = (CButton*)GetDlgItem(IDC_RADIO1);
	ASSERT(b);
	b->SetCheck(1);

	m_EdD1.QInit(20);
	m_EdD2.QInit(20);

	b = (CButton*)GetDlgItem(IDC_RADIO3);

	b->SetCheck(1);
	
	m_Dat1.SetMode(1);
	m_Dat2.SetMode(1);

	x = 1;

	m_EdD1.EnableWindow(FALSE);
	m_EdD2.EnableWindow(FALSE);

//	b->

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

示例14: GetDlgItem

void CTxMsgWndJ1939::vInitializeNmFields(void)
{
    //Set the properties of the field first
    m_omCurAddress.vSetBase(BASE_HEXADECIMAL);
    m_omCurAddress.vSetSigned(false);
    m_omCurAddress.LimitText(2);

    m_omEcuName.vSetBase(BASE_HEXADECIMAL);
    m_omEcuName.vSetSigned(false);
    m_omEcuName.LimitText(16);

    m_omDLCEdit.LimitText(4);

    m_bNM = TRUE;
    CButton* pButton = (CButton*) GetDlgItem(IDC_RADIO_NM);
    pButton->SetCheck(BST_CHECKED);
    //Populate the values

    pButton = (CButton*)GetDlgItem(IDC_RQST_ADDRESS);
    pButton->SetCheck(BST_UNCHECKED);
    pButton = (CButton*)GetDlgItem(IDC_CMD_ADDRESS);
    pButton->SetCheck(BST_UNCHECKED);
    pButton = (CButton*)GetDlgItem(IDC_CLAIM_ADDRESS);
    pButton->SetCheck(BST_CHECKED);

    CComboBox* pComboBox = (CComboBox*)GetDlgItem(IDC_COMBO_NODE);

    int nIndex = pComboBox->AddString(m_sClientParams.m_acName);
    pComboBox->SetItemData(nIndex, m_sClientParams.m_byAddress);
    pComboBox->SetCurSel(nIndex);
    m_omEcuName.vSetValue(m_sClientParams.m_unEcuName);
    m_omCurAddress.vSetValue(m_sClientParams.m_byAddress);

    UpdateData(TRUE);
}
开发者ID:ThoughtProcess,项目名称:busmaster,代码行数:35,代码来源:TxMsgWndJ1939.cpp

示例15: init

void CInsertDlg::init()
{
	ImageInfo item = album.record(fileno[cur]);
	SetDlgItemText(IDC_EDIT1, CString(item.filename().c_str()));
	SetDlgItemText(IDC_EDIT2, CString(item.textcn().c_str()));
	SetDlgItemText(IDC_EDIT3, CString(item.texten().c_str()));
	SetDlgItemText(IDC_EDIT4, CString(item.postion().c_str()));
	SetDlgItemText(IDC_EDIT5, CString(item.posl().c_str()));
	SetDlgItemText(IDC_EDIT6, CString(item.lname().c_str()));
	SetDlgItemText(IDC_EDIT7, CString(item.uper().c_str()));

	CButton* radio;
	radio = (CButton*)GetDlgItem(IDC_RADIO_1);
	radio->SetCheck(0);
	radio = (CButton*)GetDlgItem(IDC_RADIO_2);
	radio->SetCheck(0);
	radio = (CButton*)GetDlgItem(IDC_RADIO_3);
	radio->SetCheck(0);
	if (item.map().find("中国") != -1){
		radio = (CButton*)GetDlgItem(IDC_RADIO_1);
	}
	else if (item.map() == "华师大"){
		radio = (CButton*)GetDlgItem(IDC_RADIO_2);
	}
	else{
		radio = (CButton*)GetDlgItem(IDC_RADIO_3);
	}
	radio->SetCheck(1);

}
开发者ID:KaitoHH,项目名称:iPhotoBookManager,代码行数:30,代码来源:InsertDlg.cpp


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