Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SetDialogBkColor gives error c3861

Status
Not open for further replies.

panioti

Programmer
Jan 5, 2005
15
US
I found lots of examples on how to change the dialog vbackground color--all the examples agree with each other.

BOOL CEzApp::InitInstance()
{
SetDialogBkColor(RGB(255, 255, 255), RGB(0, 0, 0));
LoadStdProfileSettings(); // Load standard INI file options (including MRU)
...

This gives me compiler error c3861 Identifier not found ...
What's wrong?

 
I am pleased that I can now answer my own question.
As usual, my question has omitted a critical detail--I am using .net 2003. SetDialogBkColor is not defined in .net. The color of individual controls is still handled by overriding CWnd::OnCtlColor. The color of the dialog view is now handled by processing the WM_CTLCOLORDLG message.

LRESULT CEz1View::OnCtlColorDlg( WPARAM wParam, LPARAM lParam)
{
return (long) hBrush[0];
}

This must be included in the MESSAGE_MAP:

ON_MESSAGE(WM_CTLCOLORDLG, OnCtlColorDlg)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top