|
Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript |
c++.windows.32-bits - Error compiling HDC
in a standard WinApi programme with windows.h as the only header file, if I put: case WM_PAINT: HDC hDC; PAINTSTRUCT Ps; hDC = BeginPaint(hwnd, &Ps); TextOut(hDC, 50, 42, "Blah Blah Blah", 13); EndPaint(hwnd, &Ps); break; for one the the WndProc cases for the msg argument, when I try to compile I get this: Error 42: Symbol Undefined _TextOutA 20 If I remove the TextOut line it compiles (but does nothing ofc). It also screws up with SetBkColor and the same error. Any suggestions? Thanks in advance. Dec 25 2003
Add GDI32.LIB to your program's link phase. Also... You might want to use DrawText instead of TexOut. HTH Scrappy wrote:in a standard WinApi programme with windows.h as the only header file, if I put: case WM_PAINT: HDC hDC; PAINTSTRUCT Ps; hDC = BeginPaint(hwnd, &Ps); TextOut(hDC, 50, 42, "Blah Blah Blah", 13); EndPaint(hwnd, &Ps); break; for one the the WndProc cases for the msg argument, when I try to compile I get this: Error 42: Symbol Undefined _TextOutA 20 If I remove the TextOut line it compiles (but does nothing ofc). It also screws up with SetBkColor and the same error. Any suggestions? Thanks in advance. Dec 25 2003
Thanks loads! I just put #pragma comment(lib, "gdi32.lib") in with my includes and it all works great now!Add GDI32.LIB to your program's link phase. Also... You might want to use DrawText instead of TexOut. HTH Dec 28 2003
|