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


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

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


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

示例1: UpdateLastSearch

void CEditReplaceDlg::
OnEditSkip ()
{
  if (!UpdateData ())
    return;
  
  m_ctlFindText.SaveState(_T("Files\\ReplaceInFile"));
  m_ctlReplText.SaveState(_T("Files\\ReplaceWithInFile"));
  UpdateLastSearch ();

  CButton *pSkip = (CButton*) GetDlgItem (IDC_EDIT_SKIP);
  CButton *pRepl = (CButton*) GetDlgItem (IDC_EDIT_REPLACE);

  if (!m_bFound)
    {
      m_ptFoundAt = m_ptCurrentPos;
      m_bFound = DoHighlightText ( TRUE );
      if (m_bFound)
        {
          pSkip->SetButtonStyle (pSkip->GetButtonStyle () & ~BS_DEFPUSHBUTTON);
          pRepl->SetButtonStyle (pRepl->GetButtonStyle () | BS_DEFPUSHBUTTON);
          // pRepl->SetFocus ();
        }
      else
        {
          pRepl->SetButtonStyle (pRepl->GetButtonStyle () & ~BS_DEFPUSHBUTTON);
          pSkip->SetButtonStyle (pSkip->GetButtonStyle () | BS_DEFPUSHBUTTON);
          // pSkip->SetFocus ();
        }
      return;
    }

  if (!m_pBuddy->m_nLastFindWhatLen)
    if (m_ptFoundAt.y + 1 < m_pBuddy->GetLineCount ())
      {
        m_ptFoundAt.x = 0;
        m_ptFoundAt.y++;
      }
    else
      {
        m_bFound = FALSE;
        return;
      }
  else
    m_ptFoundAt.x += 1;
  m_bFound = DoHighlightText ( TRUE );
  if (m_bFound)
    {
      pSkip->SetButtonStyle (pSkip->GetButtonStyle () & ~BS_DEFPUSHBUTTON);
      pRepl->SetButtonStyle (pRepl->GetButtonStyle () | BS_DEFPUSHBUTTON);
      // pRepl->SetFocus ();
    }
  else
    {
      pRepl->SetButtonStyle (pRepl->GetButtonStyle () & ~BS_DEFPUSHBUTTON);
      pSkip->SetButtonStyle (pSkip->GetButtonStyle () | BS_DEFPUSHBUTTON);
      // pSkip->SetFocus ();
    }
}
开发者ID:YueLinHo,项目名称:WinMerge,代码行数:59,代码来源:ceditreplacedlg.cpp

示例2: OnSelchangeGroup

void CUsersDlgGeneral::OnSelchangeGroup() 
{
	if (m_cGroup.GetCurSel() <= 0)
	{
		m_pUser->group = _T("");
		UpdateData(TRUE);
		m_pOwner->SetCtrlState();
		if (m_nMaxUsersBypass == 2)
			m_nMaxUsersBypass = 0;
		if (m_nEnabled == 2)
			m_nEnabled = 1;
		UpdateData(FALSE);
		m_cMaxUsersBypass.SetButtonStyle(BS_AUTOCHECKBOX);
		m_cEnabled.SetButtonStyle(BS_AUTOCHECKBOX);
		
		m_pOwner->m_pSpeedLimitPage->UpdateData(TRUE);
		CButton *pButton = reinterpret_cast<CButton *>(m_pOwner->m_pSpeedLimitPage->GetDlgItem(IDC_USERS_SPEEDLIMIT_SERVERBYPASS_DOWNLOAD));
		if (pButton->GetCheck() == 2)
			pButton->SetCheck(0);
		pButton->SetButtonStyle(BS_AUTOCHECKBOX);

		pButton = reinterpret_cast<CButton *>(m_pOwner->m_pSpeedLimitPage->GetDlgItem(IDC_USERS_SPEEDLIMIT_SERVERBYPASS_DOWNLOAD));
		if (pButton->GetCheck() == 2)
			pButton->SetCheck(0);
		pButton->SetButtonStyle(BS_AUTOCHECKBOX);
		m_pOwner->m_pSpeedLimitPage->UpdateData(FALSE);
	}
	else
	{
		m_cGroup.GetLBText(m_cGroup.GetCurSel(), m_pUser->group);
		m_cMaxUsersBypass.SetButtonStyle(BS_AUTO3STATE);
		m_cEnabled.SetButtonStyle(BS_AUTO3STATE);

		((CButton *)m_pOwner->m_pSpeedLimitPage->GetDlgItem(IDC_USERS_SPEEDLIMIT_SERVERBYPASS_DOWNLOAD))->SetButtonStyle(BS_AUTO3STATE);
		((CButton *)m_pOwner->m_pSpeedLimitPage->GetDlgItem(IDC_USERS_SPEEDLIMIT_SERVERBYPASS_UPLOAD))->SetButtonStyle(BS_AUTO3STATE);
	}
}
开发者ID:11050837,项目名称:Dissertation11050837,代码行数:37,代码来源:UsersDlgGeneral.cpp

示例3: UpdateDialogData


//.........这里部分代码省略.........
			}

			if (t.material != material)
			{
				material = NOT_INIT;
			}

			if (t.nLightmapScale != nLightmapScale)
			{
				nLightmapScale = NOT_INIT;
			}

			if (!strTexture.IsEmpty() && strTexture != t.texture)
			{
				strTexture = "";
			}

			//
			// Update the checkbox state for the face attributes. If any of this face's
			// attributes are different from the current checkbox state, set the checkbox
			// to the undefined state.
			//
			m_FaceContents = t.q2contents;
			m_FaceSurface = t.q2surface;

			for (int nItem = 0; nItem < sizeof(FaceAttributes) / sizeof(FaceAttributes[0]); nItem++)
			{
				int nSet = ((*FaceAttributes[nItem].puAttribute & FaceAttributes[nItem].uFlag) != 0);
				CButton *pButton = (CButton *)GetDlgItem(FaceAttributes[nItem].uControlID);
				if (pButton != NULL)
				{
					if (pButton->GetCheck() != nSet)
					{
						pButton->SetButtonStyle(BS_AUTO3STATE);
						pButton->SetCheck(2);
					}
				}
			}
		}
	}

	//
	// Set the state of the face alignment checkbox.
	//
	CButton *pFaceAlign = (CButton *)GetDlgItem(IDC_ALIGN_FACE);

	if (nFaceAlignCount == 0)
	{
		pFaceAlign->SetCheck(0);
	}
	else if (nFaceAlignCount == faceCount)
	{
		pFaceAlign->SetCheck(1);
	}
	else
	{
		pFaceAlign->SetCheck(2);
	}

	//
	// Set the state of the world alignment checkbox.
	//
	CButton *pWorldAlign = (CButton *)GetDlgItem(IDC_ALIGN_WORLD);

	if (nWorldAlignCount == 0)
	{
开发者ID:DeadZoneLuna,项目名称:SourceEngine2007,代码行数:67,代码来源:faceedit_materialpage.cpp


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