c++.windows.32-bits - Error compiling HDC
- Scrappy (12/12) Dec 25 2003 in a standard WinApi programme with windows.h as the only header file, i...
- Jan Knepper (7/23) Dec 25 2003 Add GDI32.LIB to your program's link phase.
- Scrappy (2/5) Dec 28 2003
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.-- ManiaC++ Jan Knepper
Dec 25 2003