Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

BlackScar

A question for the programming gods and godesses

This topic is 6420 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Greetings all! I''m trying to make a program that can print text onto the screen. Sounds easy eh? But I want it over everything. I mean, applications...opengl...directx, etc. So far, I can look for a program by it''s title. (For example...Quake3) Then I can get it''s hwnd and hdc. Now, how can I put text onto it from my program? I tried doing it through TextOut on ICQ and worked perfectly. But opengl seems to not want me to print anything on it How can I go about doing this? (Btw, I know VC++ and VB... I''d prefer it to be VB, but I''ll take anything I can get.) Thanks alot! (BTW, the purpose of this is to show the time. So that you can play a game and still watch the time. It''ll also be used for timing things, etc... Just for the nosey :p ) ~-=-=-=-=-=-=~ ~Justin Eslinger~ ~.."BlackScar"..~ ~-=-=-=-=-=-=~

Share this post


Link to post
Share on other sites
Advertisement
The result of locking something disables outsiders from interfering..thus if Quake3 locks the DC then you can''t do it *that* way, I''m afraid. Maybe you could write directly to the primary surface, but then it''d need to be synchronised with quake, as it might flicker or just be invisible.

Share this post


Link to post
Share on other sites
Hmmm, interesting. I didn''t know that you could lock DCs. (Sorry, not too familiar with DCs and the like) I was wondering about the syncing problem.

I guess I''ll just have to try. What about constantly bringing a form to the top? It''d cause flicker, but at least it''d warn you.

Thanks for your reply! Anyone else?

~-=-=-=-=-=-=~
~Justin Eslinger~
~.."BlackScar"..~
~-=-=-=-=-=-=~

Share this post


Link to post
Share on other sites
Hi there,

get the screen dc i think this is either

HDC dc = GetDC(NULL);

or

HDC dc = CreateDC("DISPLAY",NULL,NULL,NULL);

then output directly to the screen.From what i remember
this will even output over directX.

Hope this helps.

Share this post


Link to post
Share on other sites
Cool, thanks! The second method worked. Of course it flickered, but at least it works. In opengl it doesn''t work, but the computers I''m making this for has d3d cards...so that shouldn''t be a problem

Thanks again!

~-=-=-=-=-=-=~
~Justin Eslinger~
~.."BlackScar"..~
~-=-=-=-=-=-=~

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!