Hi!
To add text to the bitmap you must select bitmap into Device Context and simple draw text by API function.
for example:
// Draw text into bitmap at the pt.x, pt.y position
BOOL DrawTextIntoBitmap(HBITMAP hbm, LPSTR lpszText, HFONT hFont, POINT pt)
{
HDC hdc = CreateCompatibleDC(NULL); // compatible with system screen DC
if (!hdc)
return FALSE;
HBITMAP hbmOld = (HBITMAP) SelectObject(hdc, hbm);
HFONT hFontOld = (HFONT) SelectObject(hdc, hFont);
To add text to the bitmap you must select bitmap into Device Context and simple draw text by API function.
for example:
// Draw text into bitmap at the pt.x, pt.y position
BOOL DrawTextIntoBitmap(HBITMAP
{
HDC hdc = CreateCompatibleDC(NULL); // compatible with system screen DC
if (!hdc)
return FALSE;
HBITMAP hbmOld = (HBITMAP) SelectObject(hdc, hbm);
HFONT hFontOld = (HFONT) SelectObject(hdc, hFont);
TextOut(hdc, pt. x, pt.y, lpszText, lstrlen(lpszText));
SelectObject(hdc, hFontOld);
SelectObject(hdc, hbmOld);
DeleteDC(hdc);
return TRUE;
}