Thanks for your response...how might I go about checking if something else has set the clipping region? I've looked into somem of the clipping functions but I'm actually not to familiar with the CDC. Thanks again for your response. Bret Faller, Off-Duty programmer
Bret Faller home
Posts
-
Filling a Solid Rect -
Filling a Solid RectGood day, Why would this not fill the complete rectangle specified by rcHighlight? this is for a Multiline(per item) ListCtrl and in the DrawItem function. CRect rcHighlight = GetItemRect(lpDrawItemStruct->itemID, rc); rcHighlight.left += 1; rcHighlight.top += 1; rcHighlight.right -= 1; rcHighlight.bottom = rc.bottom - 1; if (lpDrawItemStruct->itemState & ODS_SELECTED) { pDC->FillSolidRect(rcHighlight, GetSysColor(COLOR_HIGHLIGHT)); pDC->SetTextColor(GetSysColor(COLOR_HIGHLIGHTTEXT)) ; } else { pDC->FillSolidRect(rcHighlight, GetSysColor(COLOR_WINDOW)); pDC->SetTextColor(GetSysColor(COLOR_WINDOWTEXT)) ; } I've verified that the rectangle is the correct rect and size but yet FillSolidRect only fills half of it. Any help is greatly appreciated. Bret Faller, Off-Duty programmer