Solved

write words on the screen ..

Posted on 2004-10-15
3
221 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
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.

770 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