Click to See Complete Forum and Search --> : CEdit style question


cristian.muller
August 11th, 2005, 06:38 AM
Hello,
i want to change the color and background of the font in the CEdit control.I saw in MSDN that he CEdit class is derived from CWnd.

In CWnd i found a function that returns me the device context for the CWnd client area(CWnd::GetDC;CDC* GetDC( ); )..

The following problem appears:when i mapped out a var CEdit m_myEdit and tried to acces m_myEdit.GetDC the compiler outputs:
error C2039: 'GetDc' : is not a member of 'CEdit'

How do i resolve this?

golanshahar
August 12th, 2005, 04:32 AM
error C2039: 'GetDc' : is not a member of 'CEdit'

there is no GetDc() fucntion there is GetDC() ;)

and btw you can take a look HERE (http://www.codeguru.com/Cpp/controls/editctrl/) there are sevral samples for colored editbox .

Cheers

cristian.muller
August 12th, 2005, 05:28 AM
aha..the clasic problem..i guess i was tired!
:)

Thanks for the tip&links;now i'll take a look at that articles and hope i will found what i'm looking for!

Regards,
Cristian Müller