Location:
Search - FillSolidRect
Search list
Description:
// CDC::FillSolidRect is faster, but it does not handle 8-bit color depth
VERIFY(brush.CreateSolidBrush(
RGB(r+rStep*iOnBand, g + gStep*iOnBand, b + bStep * iOnBand)))
pDC->FillRect(&rectFill,&brush)
VERIFY(brush.DeleteObject())
if(rectFill.bottom > rect.bottom)
Platform: |
Size: 90169 |
Author: 郭文三 |
Hits:
Description:
// CDC::FillSolidRect is faster, but it does not handle 8-bit color depth
VERIFY(brush.CreateSolidBrush(
RGB(r+rStep*iOnBand, g + gStep*iOnBand, b + bStep * iOnBand)))
pDC->FillRect(&rectFill,&brush)
VERIFY(brush.DeleteObject())
if(rectFill.bottom > rect.bottom)-
// CDC::FillSolidRect is faster, but it does not handle 8-bit color depth
VERIFY(brush.CreateSolidBrush(
RGB(r+rStep*iOnBand, g+ gStep*iOnBand, b+ bStep* iOnBand)))
pDC->FillRect(&rectFill,&brush)
VERIFY(brush.DeleteObject())
if(rectFill.bottom > rect.bottom)
Platform: |
Size: 90112 |
Author: 郭文三 |
Hits:
Description: To get this task done, my first instinct was to catch the WM_ERASEBKGND in CMainFrame and do the FillSolidRect there. But I soon realized that approach didn t do anything other than make the frame flicker and show red only when it s being resized, otherwise the gray background was completely intact. Not exactly what I was looking for. Suddenly it became a little mystery. Why doesn t the background of the frame change when I fill it with a color in the frame s WM_ERASEBKGND handler? So I went on a hunt, I went through a lot of the CMDIFrameWnd and CFrameWnd code looking for methods that would draw on the frame, and there was not much there. I finally ended up at CMainFrame::OnCreate method, I set a breakpoint and stepped through the CMDIFrameWnd::OnCreate method. After what seemed to be hours of searching I came across the following code in CMDIFrameWnd::CreateClient:
Platform: |
Size: 50176 |
Author: kamalraj.s |
Hits: