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);
	}
}
Esempio n. 2
0
/**
	@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
}
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 );
}
// 停止
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);
}
Esempio n. 5
0
/////////////////////////////////////////////////////////////////////////////
// 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);
			}
		}
	}
}
Esempio n. 6
0
/////////////////////////////////////////////////////////////////////////////
// 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
}
Esempio n. 7
0
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;
}
Esempio n. 8
0
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; 
}
Esempio n. 9
0
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();
}
Esempio n. 10
0
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
}
Esempio n. 11
0
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
}
Esempio n. 12
0
/////////////////////////////////////////////////////////////////////////////
// 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);
}
Esempio n. 13
0
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
}
Esempio n. 14
0
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);
}
Esempio n. 15
0
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);

}
Esempio n. 16
0
void SettingEcNavi::SetUseMyTitle()
{
    CButton *q = (CButton *)GetDlgItem( IDC_RADIO_CHANGE );
    q->SetCheck( m_useMyTitle ? 1 : 0 );

    q = (CButton *)GetDlgItem( IDC_RADIO_NOCHANGE );
    q->SetCheck( m_useMyTitle ? 0 : 1 );
}
Esempio n. 17
0
void SettingNewsing::SetAuthType()
{
    CButton *q = (CButton *)GetDlgItem( IDC_RADIO_USE_NEWSING );
    q->SetCheck( m_auth == AK_ORIGINAL ? 1 : 0 );

    q = (CButton *)GetDlgItem( IDC_RADIO_USE_YJ );
    q->SetCheck( m_auth == AK_YAHOOJAPAN_BBAUTH ? 1 : 0 );
}
Esempio n. 18
0
void SettingEcNavi::SetAuthType()
{
    CButton *q = (CButton *)GetDlgItem( IDC_RADIO_USE_ECNAVI );
    q->SetCheck( m_auth == AK_ORIGINAL ? 1 : 0 );

    q = (CButton *)GetDlgItem( IDC_RADIO_USE_YJ );
    q->SetCheck( m_auth == AK_YAHOOJAPAN_BBAUTH ? 1 : 0 );
}
Esempio n. 19
0
void CRecordPage::OnShowWindow(BOOL bShow, UINT nStatus) 
/////////////////////////////////////////////////////////////////////////////
{
	//CWnd	*pCtl;
	CButton *pButton;
	ULONG	ulValue;
	char	szBuffer[ 20 ];

	CPropertyPage::OnShowWindow(bShow, nStatus);
	
	if( bShow )
	{
		int	nLineCtls = IDC_RECORD2L_SELECT - IDC_RECORD1L_SELECT;

		for( int i=0; i<NUM_WAVE_RECORD_DEVICES-3; i++ )
		{
			/////////////////////////////////////////////////////////////////
			// Input Section
			/////////////////////////////////////////////////////////////////

			m_pHalMixer->GetControl( LINE_RECORD_0 + i, LINE_NO_SOURCE, CONTROL_SOURCE_LEFT, 0, &ulValue );
			sprintf( szBuffer, "%02d", (ulValue + 1) );
			SetDlgItemText( IDC_RECORD1L_SELECT + (i*nLineCtls), szBuffer );
			
			m_pHalMixer->GetControl( LINE_RECORD_0 + i, LINE_NO_SOURCE, CONTROL_SOURCE_RIGHT, 0, &ulValue );
			sprintf( szBuffer, "%02d", (ulValue + 1) );
			SetDlgItemText( IDC_RECORD1R_SELECT + (i*nLineCtls), szBuffer );

			m_pHalMixer->GetControl( LINE_RECORD_0 + i, LINE_NO_SOURCE, CONTROL_MUTE, LEFT, &ulValue );
			pButton = (CButton *)GetDlgItem(IDC_RECORD1L_MUTE+(i*nLineCtls));
			pButton->SetCheck( ulValue );

			m_pHalMixer->GetControl( LINE_RECORD_0 + i, LINE_NO_SOURCE, CONTROL_MUTE, RIGHT, &ulValue );
			pButton = (CButton *)GetDlgItem(IDC_RECORD1R_MUTE+(i*nLineCtls));
			pButton->SetCheck( ulValue );
			
			m_pHalMixer->GetControl( LINE_RECORD_0 + i, LINE_NO_SOURCE, CONTROL_DITHER, LEFT, &ulValue );
			pButton = (CButton *)GetDlgItem(IDC_RECORD1L_DITHER+(i*nLineCtls));
			pButton->SetCheck( ulValue );

			m_pHalMixer->GetControl( LINE_RECORD_0 + i, LINE_NO_SOURCE, CONTROL_DITHER, RIGHT, &ulValue );
			pButton = (CButton *)GetDlgItem(IDC_RECORD1R_DITHER+(i*nLineCtls));
			pButton->SetCheck( ulValue );

			/////////////////////////////////////////////////////////////////
			// Monitor Section
			/////////////////////////////////////////////////////////////////

		}
		theApp.m_nPage = PAGE_RECORD;
		//SetTimer( 0, 10, NULL );
	}
	else
	{
		//KillTimer( 0 );
	}
}
Esempio n. 20
0
int CControlPanel::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
	if (CWnd::OnCreate(lpCreateStruct) == -1)
		return -1;

	// TODO:  여기에 특수화된 작성 코드를 추가합니다.
	CRect rect;
	GetWindowRect(&rect);

	list<GroundControl::Node*>& nodelist = GroundControlManager.getNodeList();

	int idx = 0;

	for (list<GroundControl::Node*>::iterator iter = nodelist.begin(); iter != nodelist.end(); ++iter)
	{
		GroundControl::Node* node = *iter;
		m_nodelist.push_back(node);
		CButton* rButton = new CButton();
			
		wstring wstr = wstring(node->name().begin(), node->name().end());

		rButton->Create(wstr.c_str(), WS_CHILD | WS_VISIBLE | BS_RADIOBUTTON, CRect(rect.left + 20, rect.top + 20 * (idx + 1), rect.left + 20 + 100, rect.top + 20 * (idx + 1) + 20), this, ID_NODE_LIST_BTN_BASE+idx);
		if (idx == 0)
		{
			rButton->SetCheck(BST_CHECKED);
			m_curnode = node;

		}
		else
		{
			rButton->SetCheck(BST_UNCHECKED);
		}
		m_nodelistBtn.push_back(rButton);
		idx++;
	}

	m_rnoneBtn.Create(_T("None"), WS_CHILD | WS_VISIBLE | BS_RADIOBUTTON, CRect(rect.left + 160, rect.top + 20, rect.left + 160 + 100, rect.top + 20 + 20), this, ID_CONTROLLER_BTN_BASE);
	m_rmouseBtn.Create(_T("Mouse"), WS_CHILD | WS_VISIBLE | BS_RADIOBUTTON, CRect(rect.left + 160, rect.top + 40, rect.left + 160 + 100, rect.top + 40 + 20), this, ID_CONTROLLER_BTN_BASE+1);
	m_rjoystickBtn.Create(_T("Joystick"), WS_CHILD | WS_VISIBLE | BS_RADIOBUTTON, CRect(rect.left + 160, rect.top + 60, rect.left + 160 + 100, rect.top + 60 + 20), this, ID_CONTROLLER_BTN_BASE+2);
	m_rnoneBtn.SetCheck(BST_UNCHECKED);
	m_rmouseBtn.SetCheck(BST_CHECKED);
	m_rjoystickBtn.SetCheck(BST_UNCHECKED);

	m_goForwardBtn.Create(_T("전진"), WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, CRect(rect.left + 110, rect.top + 100, rect.left + 110 + BUTTON_SIZE_X, rect.top + 100 + BUTTON_SIZE_Y), this, ID_GO_FORWARD_BTN);
	m_stopBtn.Create(_T("정지"), WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, CRect(rect.left + 110, rect.top + 200, rect.left + 110 + BUTTON_SIZE_X, rect.top + 200 + BUTTON_SIZE_Y), this, ID_STOP_BTN);
	m_goBackwardBtn.Create(_T("후진"), WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, CRect(rect.left + 110, rect.top + 300, rect.left + 110 + BUTTON_SIZE_X, rect.top + 300 + BUTTON_SIZE_Y), this, ID_GO_BACKWARD_BTN);
	m_goLeftBtn.Create(_T("좌회전"), WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, CRect(rect.left + 10, rect.top + 200, rect.left + 10 + BUTTON_SIZE_X, rect.top + 200 + BUTTON_SIZE_Y), this, ID_GO_LEFT_BTN);
	m_goRightBtn.Create(_T("우회전"), WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, CRect(rect.left + 210, rect.top + 200, rect.left + 210 + BUTTON_SIZE_X, rect.top +200 + BUTTON_SIZE_Y), this, ID_GO_RIGHT_BTN);

	m_mouseControlPanel.Create( NULL, NULL, WS_CHILD | WS_VISIBLE | SS_NOTIFY | WS_BORDER, CRect(rect.left + 310, rect.top + 0, rect.left + 310 + 400, rect.top + 0 + 400), this, ID_MOUSE_CONTROL_PANEL);
	
	SetTimer(100, 30, NULL);

	m_curController = &m_mouseControlPanel;
	return 0;
}
//=========================================
// 函数名: ReadyCheck
// 输  入: -
// 输  出: -
// 功  能: 设置复选框状态
//=========================================
void CDisabledSystemKeyDlg::ReadyCheck()
{
	CButton *pChk;

	// Ctrl+Shift+Esc
	pChk = (CButton*)GetDlgItem(IDC_CHKCSE);
	ASSERT(pChk);
	pChk->SetCheck(g_pKeyState->m_bDisCtShEsc);

	// LWin
	pChk = (CButton*)GetDlgItem(IDC_CHKLW);
	ASSERT(pChk);
	pChk->SetCheck(g_pKeyState->m_bDisLWin);
	
	// RWin
	pChk = (CButton*)GetDlgItem(IDC_CHKRW);
	ASSERT(pChk);
	pChk->SetCheck(g_pKeyState->m_bDisRWin);

	// CapsLock
	pChk = (CButton*)GetDlgItem(IDC_CHKCAL);
	ASSERT(pChk);
	pChk->SetCheck(g_pKeyState->m_bDisCapsLock);

	// Ctrl+Esc
	pChk = (CButton*)GetDlgItem(IDC_CHKCE);
	ASSERT(pChk);
	pChk->SetCheck(g_pKeyState->m_bDisCtEs);

	// Ctrl+Spc
	pChk = (CButton*)GetDlgItem(IDC_CHKCSPC);
	ASSERT(pChk);
	pChk->SetCheck(g_pKeyState->m_bDisCtSpc);

	// Alt+Tap
	pChk = (CButton*)GetDlgItem(IDC_CHKAT);
	ASSERT(pChk);
	pChk->SetCheck(g_pKeyState->m_bDisAltTab);

	// Ctrl+Shift
	pChk = (CButton*)GetDlgItem(IDC_CHKCS);
	ASSERT(pChk);
	pChk->SetCheck(g_pKeyState->m_bDisCtShift);

	// All
	pChk = (CButton*)GetDlgItem(IDC_CHKALL);
	ASSERT(pChk);
	pChk->SetCheck(g_pKeyState->m_bDisAll);

	// CTRL+ALT+DELETE
	pChk = (CButton*)GetDlgItem(IDC_CHKCAD);
	ASSERT(pChk);
	pChk->SetCheck(m_pInject->IsDllExist());

	pChk = NULL;
}
void CGridLoad::initRadio()
{
	CButton* pBtn = (CButton*)GetDlgItem(IDC_RADIO1);
	pBtn->SetCheck(1);
	pBtn = (CButton*)GetDlgItem(IDC_RADIO2);
	pBtn->SetCheck(0);

	m_bProductType = TRUE;
	
}
Esempio n. 23
0
void CQuanxiandlg::OnSelchangeCombo1() 
{
	UpdateData();
	CString str;
    CButton* boss = (CButton*)GetDlgItem(IDC_RADIO_BOSS);
	CButton* lingban = (CButton*)GetDlgItem(IDC_RADIO_lingban);
	CButton* yingyeyuan = (CButton*)GetDlgItem(IDC_RADIO_yingyeyuan);
	m_IDcombo.GetLBText(m_IDcombo.GetCurSel(),str);
	CString sql="select * from login where Uname='"+str+"'";
	m_pRs=theApp.m_pCon->Execute((_bstr_t)sql,NULL,adCmdText);
	CString pow;
	pow=(char*)(_bstr_t)m_pRs->GetCollect("power");
	radio=atoi(pow);
	if(radio==0)
	{
		boss->SetCheck(1);
		lingban->SetCheck(0);
		yingyeyuan->SetCheck(0);
	}
	if(radio==1)
	{
		boss->SetCheck(0);
		lingban->SetCheck(1);
		yingyeyuan->SetCheck(0);
	}
	if(radio==2)
	{
		boss->SetCheck(0);
		lingban->SetCheck(0);
		yingyeyuan->SetCheck(1);
	}
	UpdateData(false);
	
}
Esempio n. 24
0
void CIOBoardSet::SetInputButton(UINT number, UINT value)
{
	//TRACE("I/O Board = %d , value = %d \n", number, value);
	m_parent->m_uiIOStatus[number] = value;
	for (UINT i = 0 ; i < 32 ; i++)
	{
		CButton* ptn = (CButton*) GetDlgItem(IOBoardstatus[number][i]);
		if(value & (1 << i))		ptn->SetCheck(1);
		else ptn->SetCheck(0);
	}
}
Esempio n. 25
0
void CSceneShow::ClearRadioState()
{
	CButton* cRadio;
	cRadio = (CButton*)GetDlgItem(IDC_RADIO1);
	cRadio->SetCheck(FALSE);
	cRadio = (CButton*)GetDlgItem(IDC_RADIO2);
	cRadio->SetCheck(FALSE);
	cRadio = (CButton*)GetDlgItem(IDC_RADIO3);
	cRadio->SetCheck(FALSE);
	cRadio = (CButton*)GetDlgItem(IDC_RADIO4);
	cRadio->SetCheck(FALSE);
	cRadio = (CButton*)GetDlgItem(IDC_RADIO5);
	cRadio->SetCheck(FALSE);
}
BOOL CVideoOSCRuleSetDlg::OnInitDialog() 
{
	CDialog::OnInitDialog();
	_CWndCS(this);
	CString strText;
	CComboBox *pComboBox = (CComboBox*)GetDlgItem(IDC_COMBO_SENSITIVITY_LEVEL);
	strText.Format("%s", _CS("ConfigVideo.High") );
	pComboBox->InsertString(0,strText);
//	int nInsert = pComboBox->AddString(strText);
//	pComboBox->SetItemData(nInsert, 0);
	
	strText.Format("%s", _CS("ConfigVideo.Middle") );
	pComboBox->InsertString(1,strText);
//	nInsert = pComboBox->AddString(strText);
//	pComboBox->SetItemData(nInsert, 1);
	
	strText.Format("%s", _CS("ConfigVideo.Lower") );
	pComboBox->InsertString(2,strText);
//	nInsert = pComboBox->AddString(strText);
//	pComboBox->SetItemData(nInsert, 2);
	
	pComboBox->SetCurSel(m_Rule.iLevel);

	CButton* pCheck = (CButton*)GetDlgItem(IDC_CHECK_SHOWTRACE);
	if (m_Rule.iShowTrack!=0)
	{
		pCheck->SetCheck(BST_CHECKED);
	}
	else
	{
		pCheck->SetCheck(BST_UNCHECKED);
	}

	if (m_Rule.iAbandumEnable)
	{
		((CButton*)GetDlgItem(IDC_RADIO_ABANDUM))->SetCheck(BST_CHECKED);
	}
	else if (m_Rule.iStolenEnable)
	{
		((CButton*)GetDlgItem(IDC_RADIO_STOLEN))->SetCheck(BST_CHECKED);
	}
	else if (m_Rule.iNoParkingEnable)
	{
		((CButton*)GetDlgItem(IDC_RADIO_NOPARKING))->SetCheck(BST_CHECKED);
		
	}
	m_sliderRangeMin.SetPos(m_Rule.stNoParkingRulePara.stOscPara.nSizeMin);//显示其中一个最小像素,保存时,保存所有
	OnReleasedcaptureSliderRangeMin(0,0);
	return TRUE;  
}
Esempio n. 27
0
void COptionsDlg::OnNotify() { 

    TCHAR msg[MAX_PATH];

    CButton *button = (CButton *) GetDlgItem(IDC_NOTIFY);

    assert(button != NULL);

    if (button->GetCheck() == 1) {

        _stprintf(msg, _T("Printing to stderr can cause unexpected failures.\n")

                  _T("Are you sure you want to set this option?\n"));

        int res = ::MessageBox(NULL, msg, _T("Confirmation"), MB_YESNO | MYMBFLAGS);

        if (res == IDYES) {

            CheckOption(NOTIFY); 

        } else {

            button->SetCheck(0);

        }

    } else {

        CheckOption(NOTIFY); 

    }

} 
Esempio n. 28
0
void COptionsDlg::OnTraceDumpBinary() { 

    CButton *text = (CButton *) GetDlgItem(IDC_TRACEDUMP_TEXT);

    assert(text != NULL);

    CButton *binary = (CButton *) GetDlgItem(IDC_TRACEDUMP_BINARY);

    assert(binary != NULL);

    if (text->GetCheck() == 1 && binary->GetCheck() == 1) {

        ::MessageBox(NULL, _T("Trace dump must be either text or binary, not both"),

                     _T("Mutually Exclusive"), MB_OK | MYMBFLAGS);

        binary->SetCheck(0);

    } else {

        CheckOption(TRACEDUMP_BINARY); 

    }

} 
Esempio n. 29
0
// 重置设备的Check控件
void CTabSample::OnResetCheckButton(void)
{
    CButton* pButton = NULL;
    for (int i=0; i<InstrumentNum; i++)
    {
        ProcessMessages();
        m_iSelectObject[i] = 0;
        m_iSelectObjectNoise[i] = 0;
        pButton = (CButton*)GetDlgItem(m_iCheckIDInstrumentFDU[i]);
        pButton->SetCheck(0);
        pButton = NULL;
        pButton = (CButton*)GetDlgItem(m_iCheckIDNoiseFDU[i]);
        pButton->SetCheck(0);
        pButton = NULL;
    }
}
Esempio n. 30
0
void WFXEdit::DoDataExchange(CDataExchange* pDX)
{
  wfx_header tmp;
  CString tmpstr;
  int i, j;
  long value;
  CButton *cb;

  memcpy(&tmp,&the_wfx.header,sizeof(wfx_header));
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(WFXEdit)
		// NOTE: the ClassWizard will add DDX and DDV calls here
	//}}AFX_DATA_MAP
  DDX_Text(pDX, IDC_RADIUS, the_wfx.header.srcurve);
  DDX_Text(pDX, IDC_FREQUENCY, the_wfx.header.frvar);
  DDX_Text(pDX, IDC_VOLUME, the_wfx.header.volvar);
  DDX_Text(pDX, IDC_FLAGS, the_wfx.header.flags);

  value = the_wfx.header.flags;
  j=1;
  for(i=0;i<5;i++)
  {
    if(boxids[i])
    {
      cb=(CButton *) GetDlgItem(boxids[i]);
      cb->SetCheck(!!(value&j));
    }
    j<<=1;
  }
  if(memcmp(&tmp,&the_wfx.header,sizeof(wfx_header)))
  {
    the_wfx.m_changed=true;
  }
  RefreshDialog();
}