Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 230
  • Last Modified:

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 ???

0
meow00
Asked:
meow00
3 Solutions
 
AlexFMCommented:
TextOut(mdc, 100, 100, _T("Text"), 4);
0
 
Jaime OlivaresCommented:
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
 
OnegaZhangCommented:
SetBkMode(mdc, TRANSPARENT);
TextOut(mdc, 10,10,"aaaa");

welcome to www.fruitfruit.com
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now