Solved

write words on the screen ..

Posted on 2004-10-15
3
219 Views
Last Modified: 2010-04-01
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
Comment
Question by:meow00
3 Comments
 
LVL 48

Accepted Solution

by:
AlexFM earned 200 total points
ID: 12326339
TextOut(mdc, 100, 100, _T("Text"), 4);
0
 
LVL 55

Assisted Solution

by:Jaime Olivares
Jaime Olivares earned 50 total points
ID: 12329356
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
 
LVL 12

Assisted Solution

by:OnegaZhang
OnegaZhang earned 100 total points
ID: 12332690
SetBkMode(mdc, TRANSPARENT);
TextOut(mdc, 10,10,"aaaa");

welcome to www.fruitfruit.com
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now