Check out this code
Gdiplus::Graphics g(hDC);
Gdiplus::Font *f = new Font(L"Times new roman", 16);
Gdiplus::SolidBrush b(Gdiplus::Color(255,0,0,0));
g.DrawString(L"Hello", 5, f, &Gdiplus::StringFormat(), &b);
g.DrawString(L"Hello", 5, f, &Gdiplus::StringFormat(), &b);
I want to change the font size and family using the same variable "f" (actually I use a pointer to f). Is it possible?
source
share