Thu, 07/18/2002 - 00:52
Forums:
Using the Wizzard to create a MFC OCC app and inserting the line pDC->DrawText(); in the view's draw function (not that I really want it there, but it shows the problem) and the error "C2039: 'DrawText' : is not a member of 'CDC'" is generated.
Thu, 07/18/2002 - 03:50
It is because, somewhere in the OpenCASCADE includes, you have a :
#ifdef DrawText
#undef DrawText
#endif
( I don't remember where )
As workaround, you can use
::DrawTextA or ::DrawTextW if you are in UNICODE or not.
Or, at the beginning of your CView :
#ifdef UNICODE
#define DrawText DrawTextW
#else
#define DrawText DrawTextA
#endif // !UNICODE
HTH
Thu, 07/18/2002 - 18:07
Thanks, the workaround did the trick, but I still can't use CDC::DrawText.
Ryan
Thu, 07/18/2002 - 03:51
BTW, register a bug !!