Server Help

Misc User Apps - Writing directly to the screen

Anonymous - Fri Feb 24, 2006 2:01 pm
Post subject: Writing directly to the screen
im not overly familiar with graphics and directx, but on my laptop when i press keys like to change volume it overlays an image on top of all the windows. I was just wondering if anyone knows how is that done. or where i can find information on it.

I was thinking of using it to display the music track you are playing on winamp in ss (or other games)
Mr Ekted - Fri Feb 24, 2006 2:19 pm
Post subject:
Using the Win32 API, you can call GetDC(0) to get the HDC for the entire screen. Then all normal device context calls write an top of anything.

SelectObject()
SetTextColor()
SetBkColor()
SetBkMode()
SetTextAlign()
TextOut()
DrawText()
etc.

Note that if you write on top of windows, they will be left with junk on them. This is not considered to be a very Windows-friendly method.

I would recommend creating a little window to put your information in. It doesn't have to have a border, a title bar, a menu, etc. When this window closes, windows behind it will redraw as normal.
Cyan~Fire - Fri Feb 24, 2006 3:53 pm
Post subject:
Actually, I think the laptop thing is a kind of OSD (on-screen display) done by the video card itself.
Anonymous - Sat Feb 25, 2006 10:25 am
Post subject:
Mr Ekted wrote:
Using the Win32 API, you can call GetDC(0) to get the HDC for the entire screen. Then all normal device context calls write an top of anything.

SelectObject()
SetTextColor()
SetBkColor()
SetBkMode()
SetTextAlign()
TextOut()
DrawText()
etc.

Note that if you write on top of windows, they will be left with junk on them. This is not considered to be a very Windows-friendly method.

I would recommend creating a little window to put your information in. It doesn't have to have a border, a title bar, a menu, etc. When this window closes, windows behind it will redraw as normal.


Thank you!! thats just the point in the right direction i needed. Windows Api is not something im that familiar with. Give it a few weeks (got quite a lot of things to do) and ill post the program up lol.
Cyan~Fire - Sat Feb 25, 2006 11:39 pm
Post subject:
It takes more than a few weeks to get "familiar" with the Windows API. It's quite a monster.
Anonymous - Sun Feb 26, 2006 7:32 am
Post subject:
no doubt. Im not new to using the windows API but i've never used it to produce graphics so my knoledge in this area was nonexistant. There are so many functions. Its knowing the right ones that is the hard thing! Using it is the easier part. Thats what i was trying to say tongue.gif
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group