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


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

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


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

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

示例2: OnShowDisconnectedIcon

// 根据IP地址显示设备断开连接的图标
//************************************
// Method:    OnShowDisconnectedIcon
// FullName:  CInstrumentList::OnShowDisconnectedIcon
// Access:    protected 
// Returns:   void
// Qualifier:
// Parameter: unsigned int uiIPAddress
//************************************
void CInstrumentList::OnShowDisconnectedIcon(unsigned int uiIPAddress)
{
	CButton* iconbutton = NULL;
	CStatic* iconstatic = NULL;
	CButton* pButton = NULL;

	for (int i=0 ;i<= InstrumentNum; i++)
	{
		ProcessMessages();
		if (uiIPAddress == (IPSetAddrStart + i * IPSetAddrInterval))
		{
			if (i == 0)
			{
				iconstatic =(CStatic*)m_pwnd->GetDlgItem(IDC_STATIC_LAUX);
				iconstatic->SetIcon(m_iconLAUXDisconnected);
			}
			else
			{
				iconbutton = (CButton*)m_pwnd->GetDlgItem(m_iButtonIDFDU[i-1]);
				iconbutton->SetIcon(m_iconFDUDisconnected);
				pButton = (CButton*)m_pwnd->GetDlgItem(m_iCheckIDInstrumentFDU[i-1]);
				pButton->SetCheck(0);
			}
			break;
		}
	}
}
开发者ID:liquanhai,项目名称:cxm-hitech-matrix428,代码行数:36,代码来源:InstrumentList.cpp

示例3: SetOrientationPanel

void CCanvasSizeDlg::SetOrientationPanel(bool m_bWidthEnlargened, bool m_bHeightEnlargened)
{
	UpdateData();
	ClearIcon();
	int left = ((m_Orientation-1)%3 < (m_Orientation)%3)? m_Orientation-1 : -1;
	int right =  ((m_Orientation+1)%3 > m_Orientation%3)? m_Orientation+1 : -1;
	int up =  ( m_Orientation-3 >= 0)? m_Orientation-3 : -1;
	int down =  ( m_Orientation+3 <= 8)? m_Orientation+3 : -1;
		
	if (m_bWidthEnlargened) {
		if (left >= 0) {
			CButton *pButton = (CButton*)GetDlgItem(IDC_BUTTON0 + left);
			pButton->SetIcon(m_hLeft);
		}
		if (right >= 0) {
			CButton *pButton = (CButton*)GetDlgItem(IDC_BUTTON0 + right);
			pButton->SetIcon(m_hRight);
		}
	}
	else {
		if (left >= 0) {
			CButton *pButton = (CButton*)GetDlgItem(IDC_BUTTON0 + left);
			pButton->SetIcon(m_hRight);
		}
		if (right >= 0) {
			CButton *pButton = (CButton*)GetDlgItem(IDC_BUTTON0 + right);
			pButton->SetIcon(m_hLeft);
		}
	}

	if (m_bHeightEnlargened) {
		if (up >= 0) {
			CButton *pButton = (CButton*)GetDlgItem(IDC_BUTTON0 + up);
			pButton->SetIcon(m_hUp);
		}
		if (down >= 0) {
			CButton *pButton = (CButton*)GetDlgItem(IDC_BUTTON0 + down);
			pButton->SetIcon(m_hDown);
		}
	}
	else {
		if (up >= 0) {
			CButton *pButton = (CButton*)GetDlgItem(IDC_BUTTON0 + up);
			pButton->SetIcon(m_hDown);
		}
		if (down >= 0) {
			CButton *pButton = (CButton*)GetDlgItem(IDC_BUTTON0 + down);
			pButton->SetIcon(m_hUp);
		}
	}


}
开发者ID:ch3n2k,项目名称:rss,代码行数:53,代码来源:Dialog.cpp

示例4: OnButtonStartStop

void CDLgBarH::OnButtonStartStop() 
{
	KRS_running = !KRS_running;
	if (!KRS_running)
	{
		StartTimeOut(m_MapParamDefault);
		if (KRS_project_flag & KRS_PRJ_FLAG_STAGES)
			StartTimeOut(m_MapParamCM_additional_only);
		KRS_SendTOsToDB();
	}
	CButton* b = (CButton*)GetDlgItem(IDC_BUTTON_START_STOP);
	b->SetIcon(KRS_app.LoadIcon(KRS_running?IDI_ICON_STOP:IDI_ICON_START));
}
开发者ID:slawer,项目名称:krs_kal,代码行数:13,代码来源:DLgBarH.cpp

示例5: OnResetButtonIcon

// 重置设备按键的图标
void CTabSample::OnResetButtonIcon(void)
{
    CButton* iconbutton = NULL;
    CStatic* iconstatic = NULL;
    iconstatic =(CStatic*)this->GetDlgItem(IDC_STATIC_LAUX);
    iconstatic->SetIcon(m_iconLAUXDisconnected);
    iconstatic = NULL;

    for (int i=0; i<InstrumentNum; i++)
    {
        ProcessMessages();
        iconbutton = (CButton*)this->GetDlgItem(m_iButtonIDFDU[i]);
        iconbutton->SetIcon(m_iconFDUDisconnected);
        iconbutton = NULL;
    }
}
开发者ID:svn2github,项目名称:jy00755131,代码行数:17,代码来源:TabSample.cpp

示例6: ClearIcon

void CCanvasSizeDlg::ClearIcon(void)
{
	CButton *pButton = (CButton*)GetDlgItem(IDC_BUTTON0);
	pButton->SetIcon(NULL);
	pButton = (CButton*)GetDlgItem(IDC_BUTTON1);
	pButton->SetIcon(NULL);
	pButton = (CButton*)GetDlgItem(IDC_BUTTON2);
	pButton->SetIcon(NULL);
	pButton = (CButton*)GetDlgItem(IDC_BUTTON3);
	pButton->SetIcon(NULL);
	pButton = (CButton*)GetDlgItem(IDC_BUTTON4);
	pButton->SetIcon(NULL);
	pButton = (CButton*)GetDlgItem(IDC_BUTTON5);
	pButton->SetIcon(NULL);
	pButton = (CButton*)GetDlgItem(IDC_BUTTON6);
	pButton->SetIcon(NULL);
	pButton = (CButton*)GetDlgItem(IDC_BUTTON7);
	pButton->SetIcon(NULL);
	pButton = (CButton*)GetDlgItem(IDC_BUTTON8);
	pButton->SetIcon(NULL);
	
}
开发者ID:ch3n2k,项目名称:rss,代码行数:22,代码来源:Dialog.cpp

示例7: OnInitDialog

BOOL CServerGUIDlg::OnInitDialog()
{
	CDialogEx::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 *pButton = (CButton *)GetDlgItem(BTN_START_SERVER);
	if (pButton && pButton->GetSafeHwnd())
	{
		pButton->SetIcon((HICON)LoadImage(AfxGetApp()->m_hInstance,
			MAKEINTRESOURCE(ID_START),
			IMAGE_ICON, 32, 32, LR_DEFAULTCOLOR));
	}
	serverStatus = false;
	ms = new MessageSocket((CEdit*) GetDlgItem(EC_SERVER_STATUS));
	return TRUE;  // return TRUE  unless you set the focus to a control
}
开发者ID:NguyenHauHN,项目名称:CppCourse,代码行数:21,代码来源:ServerGUIDlg.cpp

示例8: OnMyInitDialog

LRESULT CDLgBarH::OnMyInitDialog(WPARAM /*wParam*/, LPARAM /*lParam*/)
{
	CButton *b;
	b = (CButton*)GetDlgItem(IDC_BUTTON_WK__MINUS);
	b->SetIcon(KRS_app.LoadIcon(IDI_ICON_MINUS));
	b = (CButton*)GetDlgItem(IDC_BUTTON_WK__PLUS);
	b->SetIcon(KRS_app.LoadIcon(IDI_ICON_PLUS));
	b = (CButton*)GetDlgItem(IDC_BUTTON_NULL2_MINUS);
	b->SetIcon(KRS_app.LoadIcon(IDI_ICON_MINUS));
	b = (CButton*)GetDlgItem(IDC_BUTTON_NULL2_PLUS);
	b->SetIcon(KRS_app.LoadIcon(IDI_ICON_PLUS));
	b = (CButton*)GetDlgItem(IDC_BUTTON_LBT_MINUS);
	b->SetIcon(KRS_app.LoadIcon(IDI_ICON_MINUS));
	b = (CButton*)GetDlgItem(IDC_BUTTON_LBT_PLUS);
	b->SetIcon(KRS_app.LoadIcon(IDI_ICON_PLUS));


	b = (CButton*)GetDlgItem(IDC_BUTTON_START_STOP);
	b->SetIcon(KRS_app.LoadIcon(KRS_running?IDI_ICON_STOP:IDI_ICON_START));

	return true;
}
开发者ID:slawer,项目名称:krs_kal,代码行数:22,代码来源:DLgBarH.cpp

示例9: OnInitDialog

LRESULT CMainDlg::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
	idTimer = 0;
	picWidth = 4.0;
	picHeight = 3.0;
	picInchOrMM = 0; // inches
	memset(picFileName, 0, sizeof(picFileName));

	// center the dialog on the screen
	CenterWindow();

	// set icons
	HICON hIcon = (HICON)::LoadImage(_Module.GetResourceInstance(), MAKEINTRESOURCE(IDR_MAINFRAME), 
		IMAGE_ICON, ::GetSystemMetrics(SM_CXICON), ::GetSystemMetrics(SM_CYICON), LR_DEFAULTCOLOR);
	SetIcon(hIcon, TRUE);
	HICON hIconSmall = (HICON)::LoadImage(_Module.GetResourceInstance(), MAKEINTRESOURCE(IDR_MAINFRAME), 
		IMAGE_ICON, ::GetSystemMetrics(SM_CXSMICON), ::GetSystemMetrics(SM_CYSMICON), LR_DEFAULTCOLOR);
	SetIcon(hIconSmall, FALSE);

	btnPlay = GetDlgItem(IDC_PLAY);
	btnStop = GetDlgItem(IDC_STOP);
	btnLoop = GetDlgItem(IDC_LOOP);
	RECT btnrc;
	btnPlay.GetClientRect(&btnrc);
	int cxy;
	if ((btnrc.bottom - btnrc.top) < 30)
		cxy = 16;
	else
		cxy = 32;
	hIcon = (HICON) ::LoadImage(_Module.GetResourceInstance(), MAKEINTRESOURCE(IDI_PLAY), IMAGE_ICON, cxy, cxy, LR_DEFAULTCOLOR);
	btnPlay.SetIcon(hIcon);
	hIcon = (HICON) ::LoadImage(_Module.GetResourceInstance(), MAKEINTRESOURCE(IDI_STOP), IMAGE_ICON, cxy, cxy, LR_DEFAULTCOLOR);
	btnStop.SetIcon(hIcon);
	btnStop.EnableWindow(FALSE);
	hIcon = (HICON) ::LoadImage(_Module.GetResourceInstance(), MAKEINTRESOURCE(IDI_LOOP), IMAGE_ICON, cxy, cxy, LR_DEFAULTCOLOR);
	btnLoop.SetIcon(hIcon);

	CButton btnStyle = GetDlgItem(IDC_SAWTOOTH);
	hIcon = (HICON) ::LoadImage(_Module.GetResourceInstance(), MAKEINTRESOURCE(IDI_SAW), IMAGE_ICON, cxy, cxy, LR_DEFAULTCOLOR);
	btnStyle.SetIcon(hIcon);
	btnStyle = GetDlgItem(IDC_SQUARE);
	hIcon = (HICON) ::LoadImage(_Module.GetResourceInstance(), MAKEINTRESOURCE(IDI_SQUARE), IMAGE_ICON, cxy, cxy, LR_DEFAULTCOLOR);
	btnStyle.SetIcon(hIcon);
	btnStyle = GetDlgItem(IDC_SIN);
	hIcon = (HICON) ::LoadImage(_Module.GetResourceInstance(), MAKEINTRESOURCE(IDI_SIN), IMAGE_ICON, cxy, cxy, LR_DEFAULTCOLOR);
	btnStyle.SetIcon(hIcon);
	btnStyle = GetDlgItem(IDC_RAMP);
	hIcon = (HICON) ::LoadImage(_Module.GetResourceInstance(), MAKEINTRESOURCE(IDI_RAMP), IMAGE_ICON, cxy, cxy, LR_DEFAULTCOLOR);
	btnStyle.SetIcon(hIcon);
	btnStyle = GetDlgItem(IDC_COPYCLIP);
	hIcon = (HICON) ::LoadImage(_Module.GetResourceInstance(), MAKEINTRESOURCE(IDI_COPY), IMAGE_ICON, cxy, cxy, LR_DEFAULTCOLOR);
	btnStyle.SetIcon(hIcon);
	btnStyle = GetDlgItem(IDC_SAVEPIC);
	hIcon = (HICON) ::LoadImage(_Module.GetResourceInstance(), MAKEINTRESOURCE(IDI_DISK), IMAGE_ICON, cxy, cxy, LR_DEFAULTCOLOR);
	btnStyle.SetIcon(hIcon);
	btnStyle = GetDlgItem(IDC_SAVEWAV);
	hIcon = (HICON) ::LoadImage(_Module.GetResourceInstance(), MAKEINTRESOURCE(IDI_WVFILE), IMAGE_ICON, cxy, cxy, LR_DEFAULTCOLOR);
	btnStyle.SetIcon(hIcon);
	btnStyle = GetDlgItem(IDC_HELP2);
	hIcon = (HICON) ::LoadImage(_Module.GetResourceInstance(), MAKEINTRESOURCE(IDI_HELP), IMAGE_ICON, cxy, cxy, LR_DEFAULTCOLOR);
	btnStyle.SetIcon(hIcon);

	// register object for message filtering and idle updates
	CMessageLoop* pLoop = _Module.GetMessageLoop();
	ATLASSERT(pLoop != NULL);
	pLoop->AddMessageFilter(this);
	pLoop->AddIdleHandler(this);

	UIAddChildWindowContainer(m_hWnd);

	pitchEd = GetDlgItem(IDC_PITCH);
	pitchEd.SetWindowText("48");

	for (int ndx = 0; ndx < WFI_MAXPART; ndx++)
	{
		sliders[ndx] = GetDlgItem(IDC_PART1+ndx);
		sliders[ndx].SetRange(0, 200, FALSE);
		sliders[ndx].SetTicFreq(20);
		sliders[ndx].SetLineSize(1);
		sliders[ndx].SetPageSize(10);
		levels[ndx] = GetDlgItem(IDC_LVL1+ndx);
	}

	SetDlgItemInt(IDC_PERIODS, 1);

	RECT rcPlot;
	CWindow frm = GetDlgItem(IDC_WVFRAME);
	frm.GetClientRect(&rcPlot);
	frm.MapWindowPoints(m_hWnd, &rcPlot);
	InflateRect(&rcPlot, -2, -2);
	wndPlot.Create(m_hWnd, rcPlot, NULL, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_BORDER, 0/*WS_EX_CLIENTEDGE*/);
	frm.ShowWindow(SW_HIDE);

	gibbs = FALSE;
	BOOL dummy;
	OnSin(0, IDC_SIN, btnStyle, dummy);

	return TRUE;
}
开发者ID:travisgoodspeed,项目名称:basicsynth,代码行数:99,代码来源:MainDlg.cpp

示例10: OnInitDialog

BOOL CfsclientwDlg::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

	//////////////////////////////////////////////////////////////////////////
	m_dwM = new DwManager("dev5", 18110, 10);
	m_dwWin.setDwManager(m_dwM);

	//m_dwM->setLogWin(pe);
	
	//////////////////////////////////////////////////////////////////////////
	m_font = new CFont;
	m_font->CreateFont(16, 0, 0, 0, FW_BOLD, FALSE, FALSE, 0, ANSI_CHARSET,
		OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY,FF_SWISS,(LPCTSTR)"Arial");
	CEdit* pe  = (CEdit *)GetDlgItem(IDC_EDIT_FILE);
	pe->SetFont(m_font, false); 
	pe->SetWindowText("/home");

	//////////////////////////////////////////////////////////////////////////
	CListCtrl * pl = (CListCtrl *)GetDlgItem(IDC_FLIST);
	pl->InsertColumn(IDX_FILENAME, "name", LVCFMT_LEFT,  200);
	pl->InsertColumn(IDX_FILEINFO, "info", LVCFMT_RIGHT, 80);
	pl->InsertColumn(IDX_FILESIZE, "size", LVCFMT_RIGHT, 120);
	pl->InsertColumn(IDX_FILETIME, "time", LVCFMT_RIGHT, 120);
	pl->InsertColumn(IDX_FULLNAME, "path", LVCFMT_LEFT,  200);	

	DWORD dwStyle = pl->GetExtendedStyle();
	dwStyle |= LVS_EX_FULLROWSELECT;
	dwStyle |= LVS_EX_GRIDLINES;
	dwStyle |= LVS_EX_CHECKBOXES;
	pl->SetExtendedStyle(dwStyle);

	//////////////////////////////////////////////////////////////////////////
	CComboBox* pcb = (CComboBox*)GetDlgItem(IDC_COMBOSRV);
	//pcb->AddString("173.230.157.138");
	pcb->AddString("map1");
	pcb->AddString("dev5");
	pcb->AddString("tj-core4");
	pcb->SetCurSel(0);

	//////////////////////////////////////////////////////////////////////////
	CButton* pbut;
	pbut = (CButton*)GetDlgItem(IDC_BUTHELP);
	//m_icoHelp = (HICON)LoadImage(NULL, "d:/material/help.ico", IMAGE_ICON, 0, 0, LR_LOADFROMFILE);
	//pbut->SetIcon(m_icoHelp);

	pbut = (CButton*)GetDlgItem(IDC_BUTBROWSE);
	HICON m_icoFolder = (HICON)LoadImage(NULL, "icon/folder.ico", IMAGE_ICON, 0, 0, LR_LOADFROMFILE);
	pbut->SetIcon(m_icoFolder);

	pbut = (CButton*)GetDlgItem(IDC_BUTDW);
	HICON m_icoDown = (HICON)LoadImage(NULL, "icon/down.ico", IMAGE_ICON, 0, 0, LR_LOADFROMFILE);
	pbut->SetIcon(m_icoDown);

	//////////////////////////////////////////////////////////////////////////
	//m_logoWin.create(0x101, 610, 2, 56, 56, this);
	//m_logoWin.loadPng("icon/connected.png");
	//m_logoWin.loadPng("icon/connectlock.png");
	//m_logoWin.loadPng("icon/connecting.png");
	//m_logoWin.startTimer();
	//m_logoWin.ShowWindow(false);

	//
	RECT rect;
	GetClientRect(&rect);
	int x = rect.right - 36;

	m_buttonLog.create(0x102, x, 4, 32, 32, this);
	m_buttonLog.loadPng("icon/82.png");

	m_buttonHelp.create(0x103, x - 32, 4, 32, 32, this);
	m_buttonHelp.loadPng("icon/70.png");

	m_gifWin.create(0x101, 10, 2, 56, 56, this);
	m_gifWin.loadGif("icon/earth2.gif");
	m_gifWin.setText("x");
	//////////////////////////////////////////////////////////////////////////
	char buf[256];
	GetCurrentDirectory(sizeof(buf), buf);
	pe  = (CEdit *)GetDlgItem(IDC_EDIT_SAVETO);
	pe->SetFont(m_font, false); 
	pe->SetWindowText(buf);

	//////////////////////////////////////////////////////////////////////////
	enableButton("server",   true);
	enableButton("download", false);
	//m_logoWin.setImage(icon_bad);

	//////////////////////////////////////////////////////////////////////////
	return TRUE;  // return TRUE  unless you set the focus to a control
}
开发者ID:simon-rock,项目名称:workspace_other,代码行数:96,代码来源:fsclientwDlg.cpp

示例11: OnInit

// 初始化
void CTabSample::OnInit(void)
{
	// 控件选择
	for (int k=0; k<GraphViewNum; k++)
	{
		ProcessMessages();
		m_iSelectObject[k] = 0;
		m_iSelectObjectNoise[k] = 0;
		m_iButtonIDFDU[k] = IDC_BUTTON_FDU1 + k;
		m_iCheckIDInstrumentFDU[k] = IDC_CHECK_GRAPHVIEW1 + k;
		m_iCheckIDNoiseFDU[k] = IDC_CHECK_NOISE1 + k;
	}

	CString strtmp = _T("");
	for (int i=0; i<GraphViewNum; i++)
	{
		ProcessMessages();
		strtmp.Format(_T("仪器%d"), i+1);
		char* pchar = strtmp.GetBuffer(0); 
		strcpy_s(m_cSelectObjectName[i],pchar);
	}
	
	// 得到当前路径
	char cSaveToFilePath[MAX_PATH];
	GetCurrentDirectory(MAX_PATH, cSaveToFilePath);
	m_csSaveFilePath = cSaveToFilePath;
	
	m_oThreadManage.m_oADCDataRecThread.m_pOScopeCtrl = &m_dlgADCData.m_OScopeCtrl;
	m_dlgADCData.m_ADCDataRecThread = &m_oThreadManage.m_oADCDataRecThread;

	// 得到本机IP地址
	char		name[255]; 
	CString		ip; 
	PHOSTENT	hostinfo; 
	if(   gethostname   (name, sizeof(name)) == 0) 
	{ 
		if((hostinfo = gethostbyname(name)) != NULL) 
		{ 
			ip = inet_ntoa(*(struct in_addr*)*hostinfo-> h_addr_list); 
		} 
	} 
	m_oThreadManage.m_HeadFrameSocket.m_csIPSource = ip;

	m_oThreadManage.m_TailFrameSocket.m_csIPSource = ip;
	m_oThreadManage.m_TailTimeFrameSocket.m_csIPSource = ip;
	m_oThreadManage.m_oSysTimeSocket.m_csIPSource = ip;
	m_oThreadManage.m_oADCDataRecThread.m_csIPSource = ip;

	m_oThreadManage.m_oSysTimeSocket.m_pADCSet = &m_oADCSet;
	m_oThreadManage.m_IPSetSocket.m_pADCSet = &m_oADCSet;


	CString str;
	str.Format("0x%04x", m_uiSendPort);
	GetDlgItem(IDC_EDIT_SENDPORT)->SetWindowText(str);

	str.Format("%d", m_uiADCFileLength);
	GetDlgItem(IDC_EDIT_ADCSAVEFRAMENB)->SetWindowText(str);

	m_iconFDUDisconnected = AfxGetApp()->LoadIcon(IDI_ICON1);
	m_iconFDUConnected = AfxGetApp()->LoadIcon(IDI_ICON2);
	m_iconLAUXDisconnected = AfxGetApp()->LoadIcon(IDI_ICON3);
	m_iconLAUXConnected = AfxGetApp()->LoadIcon(IDI_ICON4);
	
	m_oThreadManage.m_oInstrumentList.m_iconFDUDisconnected = m_iconFDUDisconnected;
	m_oThreadManage.m_oInstrumentList.m_iconLAUXDisconnected = m_iconLAUXDisconnected;
	m_oThreadManage.m_oInstrumentList.m_pwnd = this;
	m_oThreadManage.m_IPSetSocket.m_iconFDUConnected = m_iconFDUConnected;
	m_oThreadManage.m_IPSetSocket.m_iconLAUXConnected= m_iconLAUXConnected;
	m_oThreadManage.m_IPSetSocket.m_pwnd = this;
	m_oThreadManage.m_HeadFrameSocket.m_pwnd = this;

	
	m_oThreadManage.m_oSysTimeSocket.m_pSelectObject = m_iSelectObject;
	m_oThreadManage.m_oADCDataRecThread.m_pSelectObject = m_iSelectObject;
	m_oThreadManage.m_IPSetSocket.m_pSelectObject = m_iSelectObject;
	m_oThreadManage.m_oADCDataRecThread.m_pSelectObjectNoise = m_iSelectObjectNoise;
	for(int i=0; i<GraphViewNum; i++)
	{
		m_oThreadManage.m_oADCDataRecThread.m_cSelectObjectName[i] = m_cSelectObjectName[i];
		m_oThreadManage.m_oInstrumentList.m_iButtonIDFDU[i] = m_iButtonIDFDU[i];
		m_oThreadManage.m_IPSetSocket.m_iButtonIDFDU[i] = m_iButtonIDFDU[i];
		m_oThreadManage.m_oInstrumentList.m_iCheckIDInstrumentFDU[i] = m_iCheckIDInstrumentFDU[i];
		m_oThreadManage.m_IPSetSocket.m_iCheckIDInstrumentFDU[i] = m_iCheckIDInstrumentFDU[i];
	}
	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;
//.........这里部分代码省略.........
开发者ID:liquanhai,项目名称:cxm-hitech-matrix428,代码行数:101,代码来源:TabSample.cpp


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