A question for the programming gods and godesses

Started by
3 comments, last by BlackScar 23 years, 3 months ago
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"..~ ~-=-=-=-=-=-=~
~-=-=-=-=-=-=~~Justin Eslinger~~.."BlackScar"..~~-=-=-=-=-=-=~
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.
"You say I''m a bitch like it''s a *bad* thing..."[email=alanetcetc@hotmail.com]Mail[/email] Site
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"..~
~-=-=-=-=-=-=~
~-=-=-=-=-=-=~~Justin Eslinger~~.."BlackScar"..~~-=-=-=-=-=-=~
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.
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"..~
~-=-=-=-=-=-=~
~-=-=-=-=-=-=~~Justin Eslinger~~.."BlackScar"..~~-=-=-=-=-=-=~

This topic is closed to new replies.

Advertisement