I am using Dev-C++ 188.8.131.52 with g++ compiler.
I recently made a DLL in c++ that shows a window using Windows API. I discovered that the text shown inside are large and bold, which aren't looking very good. I want to change this, so I used the following code (similar):
#include <windows.h> //... sonething else ... HFONT hf = CreateFont(nHeight, nWidth, nEscapement, nOrientation, fnWeight, fdwItalic, fdwUnderline, fdwStrikeOut, fdwCharSet, fdwOutputPrecision, fdwClipPrecision, fdwQuality, fdwPitchAndFamily, lpszFace ); SendDlgItemMessage(myHwnd, IDC_TEST, WM_SETFONT, (WPARAM) hf, (LPARAM) true ); //... other stuff ...
I got this error:
[Linker error] undefined reference to `CreateFontA@56'
That seems not the problem of my source, but a problem around wingdi.h and libgdi32.a. I've searched through G**gle but I can't find one suitable solution.
May I use this code but be able to link it? Or is there other solutions to change the font? Hopefully I wouldn't have to get a new library.
Could anyone help, I would be thankful.