![]() |
CXTFontCombo no indication when focused |
Post Reply
|
| Author | |
Kukis
Newbie
Joined: 24 May 2006 Status: Offline Points: 11 |
Post Options
Thanks(0)
Quote Reply
Topic: CXTFontCombo no indication when focusedPosted: 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); |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |