
Error 'DrawText' is not a member of CDC
Yeah the 'DrawText' is correctly spelled and error message
is also correct. Actually I downloaded a sample code to
change colours, fonts and text size of Group Box. The URL
is http://www.codeguru.com/controls/SxGroupBox.html. When
I downloaded the application it works well, but when I try
to use these classes (same files SxGroupBox.cpp,
SxGroupBox.h & SxLogFont.h) in one of my application the
undermentioned error comes.
The strange thing that 'DrawText' function works ok in
application but when these files are used in my
application the error which I mentioned occured.
Any thought about that?
Regards
Fayyaz
Quote:
>-----Original Message-----
>> I am trying to use 'DrawText' function of CDC class in
my
>> application using an instantiated object of CPaintDC
class
>> (which is inherited from CDC class), but compiler gives
>> the following error
>> Error C2039: 'DrawText' : is not a member of 'CPaintDC'
>Is that the exact error message? (Formatting looks a bit
different.)
>> I donot know what is the cause of this error
as 'DrawText'
>> is member of CDC which is base class of CPaintDC.
>> I tried to use this function in another sample
application
>> of dialog box, it works fine, but in my main application
>> it gives above error
>> Any thoughts about it?
>Is DrawText perhaps mis-spelled?
>Jay
>.