CompuServe Thread

#formview

2 messages in this thread
#30329From: Brad StrausbaughJul 8, 1994 6:07 PM
I' writing a simple formview application — Just a few edit controls, static controls and buttons in the main view. I want the backround color of the main client area to be gray (RGB(192,192,192)) — by default it comes up white. I looked at CWinApp::SetDialogBkColor but that only affects dialogs and not the main view. I also tried a CDC::FillRect with the CBrush* set to RGB(192,192,192). That works find except the static edit controls stick out with black text on a white backround, I want them to be black text on a gray backround. I suspect the answer lies in CDC::SetBkColor but I don't know where to call it from. I tried calling it from OnDraw, OnPaint and OnInitialUpdate, but with no success. Help! -Brad.
#30354From: Gary CappsJul 8, 1994 10:41 PM
BS> I' writing a simple formview application — Just a few edit controls, BS> static controls Band buttons in the main view. I want the backround BS> color of the main client area to be gray (RGB(192,192,192)) — by BS> default it comes up white. You must handle both the OnEraseBkgnd() (to get the gray window background) and OnCtlColor() (for the static controls) messages for your CFormView. gc Norman, Oklahoma USA — "Is that a *real* poncho or is that a *Sears* poncho?"