Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Property Grid
  New Posts New Posts RSS Feed - mixed checkbox
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

mixed checkbox

 Post Reply Post Reply
Author
Message
esc67 View Drop Down
Newbie
Newbie


Joined: 09 June 2005
Status: Offline
Points: 29
Post Options Post Options   Thanks (0) Thanks(0)   Quote esc67 Quote  Post ReplyReply Direct Link To This Post Topic: mixed checkbox
    Posted: 17 February 2007 at 3:15am

Can you add a "Mixed" property for CXTPPropertyGridItemBool?

Here's my override (for 10.4.2)
 

 BOOL OnDrawItemValue(CDC& dc, CRect rcValue)
 {
  if (!m_bCheckBoxStyle)
   return FALSE;
  CRect rcSample(rcValue.left - 1, rcValue.CenterPoint().y - 6, rcValue.left - 1 + 13, rcValue.CenterPoint().y + 7);
  CXTPPropertyGridPaintManager* pPaintManager = m_pGrid->GetPaintManager();
  if (pPaintManager->m_buttonsStyle == xtpGridButtonsThemed && pPaintManager->m_themeButton.IsAppThemed())
  {
   int style =
    GetReadOnly()
     ? (isMultiValue()
      ? CBS_MIXEDDISABLED
      : (GetBool() ? CBS_CHECKEDDISABLED : CBS_UNCHECKEDDISABLED)
     )
     : (isMultiValue()
      ? CBS_MIXEDNORMAL
      : (GetBool() ? CBS_CHECKEDNORMAL : CBS_UNCHECKEDNORMAL)
     );
   pPaintManager->m_themeButton.DrawThemeBackground(dc, BP_CHECKBOX, style, rcSample, 0);
  }
  else
  {
   dc.DrawFrameControl(rcSample, DFC_BUTTON, DFCS_BUTTONCHECK |
    (GetReadOnly() ? DFCS_INACTIVE : 0) | (GetBool() ? DFCS_CHECKED : 0));
  }
  return TRUE;
 }
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.172 seconds.