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


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

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


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

示例1: OnYes

void CCellphoneDlg::OnYes() 
{
	// TODO: Add extra validation here
	m_pCellphoneSocket = new CellphoneSocket();

	if( !m_pCellphoneSocket->Create(CELLPHONE_PORT) ) {
		MessageBox("Failed to create the chatting socket");
		delete m_pCellphoneSocket;
		m_pCellphoneSocket = NULL;
	}
	if( !m_pCellphoneSocket->Listen() ) {
		MessageBox("Failed to listen to a connection for chat");
		delete m_pCellphoneSocket;
		m_pCellphoneSocket = NULL;
	}

	CEdit* status = (CEdit*)GetDlgItem(IDC_STATUS);
	CButton* ok = (CButton*)GetDlgItem(ID_YES);
	CButton* cancel = (CButton*)GetDlgItem(ID_NO);

	status->SetWindowText("Listening to a cellphone...");
	ok->ShowWindow(FALSE);
	cancel->SetWindowText("Cancel");
	cancel->ShowWindow(TRUE);

	m_bIsListening = true;
	m_bIsConnected = false;
}
开发者ID:DanGrise,项目名称:HugMe,代码行数:28,代码来源:CellphoneDlg.cpp

示例2: GetDlgItem

void
CMonProcDlg::OnCancelCheckTomcat( )
{
   CButton *pCheckButton = (CButton *) GetDlgItem( IDC_CHECKTOMCAT );
   CButton *pCancelButton = (CButton *) GetDlgItem( IDC_CANCELCHECKTOMCAT );

   pCheckButton->EnableWindow( TRUE );
   pCheckButton->ShowWindow( SW_SHOW );
   pCancelButton->ShowWindow( SW_HIDE );
   PumpMessages( );
   CancelCheckTomcat( );
}
开发者ID:DeegC,项目名称:10d,代码行数:12,代码来源:MonProcDlg.cpp

示例3: showCtl

void zstringEx::showCtl(int CtlID,BOOL isshow,HWND ParentWindowHwnd)
{
	HWND oh;					
	if(ParentWindowHwnd==NULL)
		{
		CWnd *w=::AfxGetMainWnd();
		oh=w->m_hWnd;
		}
	else oh=ParentWindowHwnd;

	CButton b;	
	b.Attach(GetDlgItem(oh,CtlID));
	if(isshow)b.ShowWindow(SW_SHOW);else b.ShowWindow(SW_HIDE);
    b.Detach();
}
开发者ID:Leoyuseu,项目名称:CodeHub,代码行数:15,代码来源:zstringEx.cpp

示例4: CreateButton

void CDBSchemaTableView::CreateButton(CButton& btn, UINT id, CWnd* pParent, LPCTSTR lpTitle, UINT width, UINT height, DWORD dwStyle, CFont* pFont)
{
	static CFont* pDefaultFont = 0;

	if(!pDefaultFont)
	{
		pDefaultFont = new CFont;
		pDefaultFont->CreateFont(16,		//   nHeight
			0,								//   nWidth
			0,								//   nEscapement
			0,								//   nOrientation
			0,								//   nWeight
			FALSE,							//   bItalic
			FALSE,							//   bUnderline
			0,								//   cStrikeOut
			ANSI_CHARSET,					//   nCharSet
			OUT_DEFAULT_PRECIS,				//   nOutPrecision
			CLIP_DEFAULT_PRECIS,			//   nClipPrecision
			DEFAULT_QUALITY,				//   nQuality
			DEFAULT_PITCH   |   FF_SWISS,	//   nPitchAndFamily
			_T( "Arial "));					//   lpszFac 
	}

	RECT rect = {0, 0, width, height};
	btn.Create(lpTitle, dwStyle, rect, pParent, id);
	if(!pFont) pFont = pDefaultFont;
	btn.SetFont(pFont);
	btn.ShowWindow(SW_SHOW);
}
开发者ID:yedaoq,项目名称:YedaoqCodeSpace,代码行数:29,代码来源:DBSchemaTableView.cpp

示例5: RefreshDialog

void CScriptEdit::RefreshDialog()
{
  CString tmpstr;
  CButton *cb;
  int topline;
  int i;

  if(m_firsterror>=0)
  {
    topline=m_text_control.GetFirstVisibleLine();
    for(i=0;i<LINES;i++)
    {
      cb=(CButton *) GetDlgItem(IDC_U1+i);
      if(topline+i>=m_count)
      {
        cb->ShowWindow(false);
      }
      else
      {
        cb->ShowWindow(true);
        tmpstr.Format("%d",topline+i+1);
        cb->SetWindowText(tmpstr);
        if(m_errors[topline+i]&0xffff) cb->SetCheck(false);
        else cb->SetCheck(true);
      }
    }
  }
  else
  {
    topline=m_text_control.GetFirstVisibleLine();
    for(i=0;i<LINES;i++)
    {
      cb=(CButton *) GetDlgItem(IDC_U1+i);
      if(topline+i>=m_count)
      {
        cb->ShowWindow(false);
      }
      else
      {
        cb->ShowWindow(true);
        tmpstr.Format("%d",topline+i+1);
        cb->SetWindowText(tmpstr);
        cb->SetCheck(true);
      }
    }
  }
}
开发者ID:TeoTwawki,项目名称:dltcep,代码行数:47,代码来源:ScriptEdit.cpp

示例6: OnInitDialog

BOOL CFormatConverterWnd::OnInitDialog()
{
    BOOL bResult = CPropertySheet::OnInitDialog();
    // TODO:  Add your specialized code here
    ModifyStyle(0, WS_MINIMIZEBOX);
    CButton* omBtn;
    WINDOWPLACEMENT omWndPlace;
    omBtn = reinterpret_cast<CButton*>(GetDlgItem(ID_APPLY_NOW));
    omBtn->ShowWindow(SW_HIDE);
    omBtn->GetWindowPlacement(&omWndPlace);
    omBtn = reinterpret_cast<CButton*>(GetDlgItem(IDOK));
    omBtn->ShowWindow(SW_HIDE);
    omBtn = reinterpret_cast<CButton*>(GetDlgItem(IDCANCEL));
    omBtn->SetWindowText("Close");
    omBtn->SetWindowPlacement(&omWndPlace);
    return bResult;
}
开发者ID:Conti-Meissner,项目名称:busmaster,代码行数:17,代码来源:FormatConverterWnd.cpp

示例7: updateState

void Display::updateState(BOOL pstate,BOOL nstate)
{
CEdit *eser,*eport,*euser;
CStatic *sser,*sport,*suser,*sgroup1,*sgroup2;
CButton *con;

		//Destroy server related items	
		con=(CButton*)GetDlgItem(IDC_BUTTON1);
		con->ShowWindow(pstate); 
		eser=(CEdit*)GetDlgItem(IDC_EDIT1);
		eser->ShowWindow(pstate); 
		
		
		eport=(CEdit*)GetDlgItem(IDC_EDIT2);
		eport->ShowWindow(pstate); 	
		
		euser=(CEdit*)GetDlgItem(IDC_EDIT3);
		euser->ShowWindow(pstate); 
		
		sser=(CStatic*)GetDlgItem(1098);
		sser->ShowWindow(pstate); 
		
		suser=(CStatic*)GetDlgItem(1086);
		suser->ShowWindow(pstate);

		
		sport=(CStatic*)GetDlgItem(1099);
		sport->ShowWindow(pstate); 

		sgroup1=(CStatic*)GetDlgItem(1097);
		sgroup1->ShowWindow(pstate); 



		//Enable Send to items
		sgroup2=(CStatic*)GetDlgItem(1075);
		sgroup2->ShowWindow(nstate);

		radio1=(CButton*)GetDlgItem(IDC_RADIO1);
		radio2=(CButton*)GetDlgItem(IDC_RADIO2);
		start=(CButton*)GetDlgItem(IDC_BUTTON5);
		stop=(CButton*)GetDlgItem(IDC_BUTTON6);
		
		
		radio1->ShowWindow(nstate);
		radio2->ShowWindow(nstate);

		radio1->SetCheck(1);
		radio2->SetCheck(0);

		start->ShowWindow(nstate);
		cbox->ShowWindow(nstate);
		if(doit==TRUE)
		talk->ShowWindow(TRUE);
		anicon->ShowWindow(FALSE);
	
		
}
开发者ID:Erls-Corporation,项目名称:VoiceChatWindows,代码行数:58,代码来源:Display.cpp

示例8: OnShowWindow

void ProceedingDialog::OnShowWindow(BOOL bShow, UINT nStatus) 
{
	CDialog::OnShowWindow(bShow, nStatus);
	
    if ( bShow ) {
        CButton *bp = (CButton *)GetDlgItem( IDCANCEL );
        bp->ShowWindow( SW_HIDE );
    }
}
开发者ID:SATOSHI-G,项目名称:Chirrup,代码行数:9,代码来源:ProceedingDialog.cpp

示例9: OnAccept

LRESULT CCellphoneDlg::OnAccept(WPARAM wParam, LPARAM lParam)
{
	m_device->m_bOnInputDevice = true;
	m_device->m_typeOnInputDevice = CELLPHONE_TOUCHPAD;

	CEdit* status = (CEdit*)GetDlgItem(IDC_STATUS);
	CButton* ok = (CButton*)GetDlgItem(ID_YES);
	CButton* cancel = (CButton*)GetDlgItem(ID_NO);

	status->SetWindowText("Cellphone is connected");
	ok->ShowWindow(FALSE);
	cancel->SetWindowText("Disconnect");
	cancel->ShowWindow(TRUE);

	m_bIsListening = false;
	m_bIsConnected = true;

	return 0;
}
开发者ID:DanGrise,项目名称:HugMe,代码行数:19,代码来源:CellphoneDlg.cpp

示例10: UpdateHoldButton

void MessagesDlg::UpdateHoldButton(pjsua_call_info *call_info)
{
#ifndef _GLOBAL_NO_HOLD
	MessagesContact* messagesContact = GetMessageContact();
	if (messagesContact) {
		CButton* button = (CButton*)GetDlgItem(IDC_HOLD);
		CButton* buttonTransfer = (CButton*)GetDlgItem(IDC_TRANSFER);
		CButton* buttonDialer = (CButton*)microsipDlg->pageDialer->GetDlgItem(IDC_HOLD);
		CButton* buttonTransferDialer = (CButton*)microsipDlg->pageDialer->GetDlgItem(IDC_TRANSFER);
		if (messagesContact->callId != -1) {
			if (call_info && messagesContact->callId == call_info->id && call_info->media_cnt>0) {
				buttonTransfer->ShowWindow(SW_SHOW);
				buttonTransferDialer->EnableWindow(TRUE);
				if (call_info->media_status == PJSUA_CALL_MEDIA_ACTIVE
					|| call_info->media_status == PJSUA_CALL_MEDIA_REMOTE_HOLD
					) {
						button->ShowWindow(SW_SHOW);
						button->SetCheck(BST_UNCHECKED);
						buttonDialer->EnableWindow(TRUE);
						buttonDialer->SetCheck(BST_UNCHECKED);
						return;
				} else if (call_info->media_status == PJSUA_CALL_MEDIA_LOCAL_HOLD
					|| call_info->media_status == PJSUA_CALL_MEDIA_NONE) {
						button->ShowWindow(SW_SHOW);
						button->SetCheck(BST_CHECKED);
						buttonDialer->EnableWindow(TRUE);
						buttonDialer->SetCheck(BST_CHECKED);
						return;
				}
			}
		} else {
			button->ShowWindow(SW_HIDE);
			button->SetCheck(BST_UNCHECKED);
			buttonDialer->EnableWindow(FALSE);
			buttonDialer->SetCheck(BST_UNCHECKED);
			buttonTransfer->ShowWindow(SW_HIDE);
			buttonTransferDialer->EnableWindow(FALSE);
		}
	}
#endif
}
开发者ID:cookie114,项目名称:PerforceRoot_Lupc,代码行数:41,代码来源:MessagesDlg.cpp

示例11: 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;
}
开发者ID:killbug2004,项目名称:WSProf,代码行数:41,代码来源:WSPrintDialog.cpp

示例12: OnNo

void CCellphoneDlg::OnNo() 
{
	// TODO: Add extra cleanup here
	CEdit* status = (CEdit*)GetDlgItem(IDC_STATUS);
	CButton* ok = (CButton*)GetDlgItem(ID_YES);
	CButton* cancel = (CButton*)GetDlgItem(ID_NO);

	if(m_pCellphoneSocket) {
		delete m_pCellphoneSocket;
		m_pCellphoneSocket = NULL;
	}

	status->SetWindowText("Listen to a cellphone?");
	ok->SetWindowText("Listen");

	ok->ShowWindow(TRUE);
	cancel->ShowWindow(FALSE);

	m_bIsListening = false;
	m_bIsConnected = false;
}
开发者ID:DanGrise,项目名称:HugMe,代码行数:21,代码来源:CellphoneDlg.cpp

示例13: OnInitDialog

BOOL CCellphoneDlg::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	m_device = &((CChatDlg*)m_pChatDlg)->m_pHugMe->m_device;

	CEdit* status = (CEdit*)GetDlgItem(IDC_STATUS);
	CButton* ok = (CButton*)GetDlgItem(ID_YES);
	CButton* cancel = (CButton*)GetDlgItem(ID_NO);

	status->SetWindowText("Listen to a cellphone?");
	ok->SetWindowText("Listen");

	ok->ShowWindow(TRUE);
	cancel->ShowWindow(FALSE);

	m_bIsListening = false;
	m_bIsConnected = false;
		
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
开发者ID:DanGrise,项目名称:HugMe,代码行数:23,代码来源:CellphoneDlg.cpp

示例14: OnPaint

void CWelcomeWnd::OnPaint() 
{
	CPaintDC dc(this); // device context for painting

	// get our own DC instead, with no restrictions
	CDC* pDC = GetDC();

	// realize the palette
	CPalette* pOldPalette = pDC->SelectPalette(m_bitmap.GetPalette(), FALSE);
	pDC->RealizePalette();

	// And draw the bitmap
	BITMAP bmInfo;
	if (m_bitmap.m_hObject == NULL)
		return;
	m_bitmap.GetObject(sizeof(BITMAP),&bmInfo);
	CDC newDC;
	newDC.CreateCompatibleDC(pDC);
	CBitmap* pOldBitmap = newDC.SelectObject(&m_bitmap);
	pDC->BitBlt(0,0,bmInfo.bmWidth,bmInfo.bmHeight,&newDC,0,0,SRCCOPY);

	//
	(void)newDC.SelectObject(pOldBitmap);
	newDC.DeleteDC();
	pDC->SelectPalette(pOldPalette, FALSE);
	ReleaseDC(pDC);

	// draw the 'OK' button
	CRect winRect, rect;
	GetClientRect(&winRect);
	CButton* pBtn = (CButton*) GetDlgItem(IDOK);
	pBtn->GetWindowRect(&rect);
	ScreenToClient(&rect);
	int nWidth = rect.Width();
	int nHeight = rect.Height();
	rect.bottom = winRect.bottom - 24;
	rect.top = rect.bottom - nHeight;
	rect.left = (winRect.right - nWidth) / 2;
	rect.right = rect.left + nWidth;
	pBtn->MoveWindow(&rect);
	pBtn->ShowWindow(SW_SHOW);
}
开发者ID:azureskydiver,项目名称:EasyBridge,代码行数:42,代码来源:WelcomeWnd.cpp

示例15: callback

// enum camera callback
static void callback(void *pItem, char *pDeviceName)
{
	TCHAR buffer[80] = L"";
	size_t wlen;
	int *idcCam = (int*)pItem;
	if (*idcCam <= IDC_CAM4) {
		CButton *item = (CButton*)pDlg->GetDlgItem(*idcCam);

		item->EnableWindow();
		item->SetCheck(BST_CHECKED);
		item->ShowWindow(SW_SHOWNORMAL);
		mbstowcs_s(&wlen, buffer, pDeviceName, 80);
		// Buffaloのカメラの行末にCR,LFが入っているので、これを除去
		for (wlen--; 0 < wlen; wlen--) {
			if (buffer[wlen] == 13 || buffer[wlen] == 10)
				buffer[wlen] = 0;
		}
		item->SetWindowText(buffer);
	}
	(*idcCam)++;
}
开发者ID:neon-izm,项目名称:StitchCam,代码行数:22,代码来源:OpenCVStitch2013Dlg.cpp


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