Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - CXTFontCombo no indication when focused
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTFontCombo no indication when focused

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


Joined: 24 May 2006
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote Kukis Quote  Post ReplyReply Direct Link To This Post Topic: CXTFontCombo no indication when focused
    Posted: 12 September 2006 at 8:35am

CXTFontCombo control desn't indicate focused state when font isn't selected (edit part of the combobox is empty). I dont want to select anything on init to let the user to decide what should be selected and to know has user selected anything or not. Right now CXTFontCombo control skips drawing entirely if no selection was done:

void CXTFontCombo::DrawItem(LPDRAWITEMSTRUCT lpDIS)
{
if (lpDIS->itemID == (UINT)-1)
{
return;
}
           ……….
      if (nState & ODS_SELECTED)
      {
            pDC->FillSolidRect(rcItem, GetXtremeColor(COLOR_HIGHLIGHT));
            pDC->SetTextColor(GetXtremeColor(COLOR_HIGHLIGHTTEXT));
            pDC->DrawFocusRect(&rcItem);
      }
      else
      {
            pDC->FillSolidRect(rcItem, GetXtremeColor(COLOR_WINDOW));
            pDC->SetTextColor(GetXtremeColor(COLOR_WINDOWTEXT));
      }
…….
}
 
Should't it draw background and focus rectangle anyway?
 
P.S. And check ODS_NOFOCUSRECT before drawing a focus rectangle :
 
if(!(nState & ODS_NOFOCUSRECT))
    pDC->DrawFocusRect(&rcItem);
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.047 seconds.