Get Parent Window Color

Get Parent Window Color
CWnd *pParent = GetParent();
HBRUSH hParentBrush = (HBRUSH)::SendMessage(pParent->GetSafeHwnd(),
        WM_CTLCOLOR, CTLCOLOR_DLG, (long)pParent);
                    
First Fill The Rect with The Parent Color
pDCMem->FillRect(rc, CBrush::FromHandle(hParentBrush));
//first fill the rect with the parent color, then draw on it.
 

你可能感兴趣的:(Get Parent Window Color)