GetSysColor(COLOR_BTNFACE)
CTLCOLOR_DLG
COLOR_BTNFACE
//Extract window background color CDC *wndDC = m_WndofInterest->GetDC(); //Get a DC to the wnd of interest COLORREC wndBK = wndDC->GetPixel(0,0); //Get color of a pixel (origin here) ReleaseDC(wndDC); //Done, release DC
HDC hdc = GetDC(hDlg);HBRUSH hbr = (HBRUSH)SendMessage(hDlg,WM_CTLCOLORDLG,(WPARAM)hdc,(LPARAM)hDlg);LOGBRUSH logb;ReleaseDC(hDlg,hdc);if(GetObject(hbr,sizeof(logb),&logb)){ logb.lbColor; // <- here is the color}
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)