Solved

How to display text on windows applications?

Posted on 2009-04-02
5
240 Views
Last Modified: 2013-11-17
Is it possible to create a software to display text on windows applications such as games?
If so, can you please provide me the documentation I should study?
0
Comment
Question by:Chrysaor
5 Comments
 
LVL 53

Assisted Solution

by:Infinity08
Infinity08 earned 50 total points
ID: 24048501
Yes, that's definitely possible. How to do that, depends on what kind of application you're talking about, and which graphics libraries you use for output.

What kind of game is this ? Which graphics libraries do you use ? Or is this a standard GUI game using the Windows API or another more specific framework ? Or ...
0
 
LVL 16

Assisted Solution

by:George Tokas
George Tokas earned 50 total points
ID: 24052320
Addition:
And the compiler used. If it is C++ Builder there are components for that job...

George Tokas.
0
 
LVL 86

Accepted Solution

by:
jkr earned 150 total points
ID: 24052323
The API in question is 'DrawText()' (http://msdn.microsoft.com/en-us/library/dd162498(VS.85).aspx). For an example, see http://msdn.microsoft.com/en-us/library/ms646268(VS.85).aspx ("Using Keyboard Input" - the text entered is the text that's displayed), the scoop would be to
        case WM_PAINT: 
            if (cch == 0)       // nothing in input buffer 
                break; 
 
            hdc = BeginPaint(hwndMain, &ps); 
            HideCaret(hwndMain); 
 
            // Set the clipping rectangle, and then draw the text 
            // into it. 
 
            SetRect(&rc, 0, 0, dwLineLen, dwClientY); 
            DrawText(hdc, pchInputBuf, -1, &rc, DT_LEFT); 
 
            ShowCaret(hwndMain); 
            EndPaint(hwndMain, &ps); 
            break; 

Open in new window

0
 

Author Comment

by:Chrysaor
ID: 24066637
Infinity08: A simple windows application, such as the windows games or Paint.
George Tokas: Can you please tell me some of these components?
0
 
LVL 53

Expert Comment

by:Infinity08
ID: 24075181
>> Infinity08: A simple windows application, such as the windows games or Paint.

Didn't the DrawText function jkr suggested work for you ?
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

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

Question has a verified solution.

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

Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

856 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