Solved

How to display text on windows applications?

Posted on 2009-04-02
5
238 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
>> 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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

728 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

9 Experts available now in Live!

Get 1:1 Help Now