write words on the screen ..

Hi Experts,

    In the following window, I can use BitBlt to load image to the screen ... but how do I write text on the screen at certain position ??? many thanks !!!

//--------------------------------------------------------
 hWnd = CreateWindow("canvas", "Meow", WS_OVERLAPPEDWINDOW,
      CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, hInstance, NULL);
 SelectObject(bufdc, map) ;
BitBlt(mdc,x,y, 160, 80, bufdc, 160,0,SRCAND) ; // <----  image ... how do I put the text ???

LVL 1
meow00Asked:
Who is Participating?
 
AlexFMConnect With a Mentor Commented:
TextOut(mdc, 100, 100, _T("Text"), 4);
0
 
Jaime OlivaresConnect With a Mentor Software ArchitectCommented:
DrawText() function will give you more control over alignment, clipping and bounding rectangle:
http://msdn.microsoft.com/library/en-us/gdi/fontext_0odw.asp
0
 
OnegaZhangConnect With a Mentor Commented:
SetBkMode(mdc, TRANSPARENT);
TextOut(mdc, 10,10,"aaaa");

welcome to www.fruitfruit.com
0
All Courses

From novice to tech pro — start learning today.