Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
Writing directly to the screen

 
Post new topic   Reply to topic Printable version
 View previous topic  Photoshop Image Rotator Post :: Post lvl tile swap changer is their one?  View next topic  
Author Message
Doc Flabby
Guest


Offline

PostPosted: Fri Feb 24, 2006 2:01 pm    Post subject: Writing directly to the screen Reply to topic Reply with quote

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)
Back to top
Mr Ekted
Movie Geek


Gender:Gender:Male
Joined: Feb 09 2004
Posts: 1379
Offline

PostPosted: Fri Feb 24, 2006 2:19 pm    Post subject: Reply to topic Reply with quote

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.
_________________
4,691 irradiated haggis!
Back to top
View users profile Send private message Add User to Ignore List
Cyan~Fire
I'll count you!
I'll count you!


Age:36
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Fri Feb 24, 2006 3:53 pm    Post subject: Reply to topic Reply with quote

Actually, I think the laptop thing is a kind of OSD (on-screen display) done by the video card itself.
_________________
This help is informational only. No representation is made or warranty given as to its content. User assumes all risk of use. Cyan~Fire assumes no responsibility for any loss or delay resulting from such use.
Wise men STILL seek Him.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Doc Flabby
Guest


Offline

PostPosted: Sat Feb 25, 2006 10:25 am    Post subject: Reply to topic Reply with quote

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.
Back to top
Cyan~Fire
I'll count you!
I'll count you!


Age:36
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Sat Feb 25, 2006 11:39 pm    Post subject: Reply to topic Reply with quote

It takes more than a few weeks to get "familiar" with the Windows API. It's quite a monster.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
doc Flabby
Guest


Offline

PostPosted: Sun Feb 26, 2006 7:32 am    Post subject: Reply to topic Reply with quote

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
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> Misc User Apps All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 657 page(s) served in previous 5 minutes.

phpBB Created this page in 0.528960 seconds : 31 queries executed (80.4%): GZIP compression disabled