Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Dec 12th, 2005, 1:10 PM   #1
irish
Programmer
 
Join Date: Nov 2005
Location: Belfast
Posts: 35
Rep Power: 0 irish is an unknown quantity at this point
Making a minimizer

I have a game for the pc, which takes up the full screen. I want to make a program that will minimize it to the taskbar so that i can do other things while the game is running(e.g. look at a gaming website). How would I go about this, or what code would I use?
irish is offline   Reply With Quote
Old Dec 12th, 2005, 1:17 PM   #2
Polyphemus_
Expert Programmer
 
Polyphemus_'s Avatar
 
Join Date: Aug 2005
Location: Rotterdam, the Netherlands
Posts: 942
Rep Power: 4 Polyphemus_ is on a distinguished road
doesn't ALT+TAB work, or pressing the start button? You can also CTRL+ALT+DEL, which will show up together with the task bar. You can pick another task from the taskbar then, and close the task manager.
Polyphemus_ is offline   Reply With Quote
Old Dec 12th, 2005, 1:31 PM   #3
irish
Programmer
 
Join Date: Nov 2005
Location: Belfast
Posts: 35
Rep Power: 0 irish is an unknown quantity at this point
Yes but if there is less 'work' involved in minimizing then it will benefit the gamer(as he/she will kill more people ) <-- dont quote me on that .

Plus, this is for my own experience on what code is used for this type of program.
irish is offline   Reply With Quote
Old Dec 12th, 2005, 1:40 PM   #4
coldDeath
Expert Programmer
 
coldDeath's Avatar
 
Join Date: Aug 2005
Location: UK
Posts: 862
Rep Power: 4 coldDeath is on a distinguished road
Send a message via AIM to coldDeath Send a message via Yahoo to coldDeath
ALT+TAB is doing exactly what you described.

But if you think you can do a better job look at the win32api.
__________________
Join us at #programmingforums @ irc.freenode.net!

My software never has bugs. It just develops random features.
coldDeath is offline   Reply With Quote
Old Dec 12th, 2005, 1:54 PM   #5
ivan
Professional Programmer
 
ivan's Avatar
 
Join Date: Sep 2005
Location: serbia & montenegro
Posts: 484
Rep Power: 4 ivan is on a distinguished road
There are some games that use alt+tab protection... How about this?
ivan is offline   Reply With Quote
Old Dec 12th, 2005, 1:57 PM   #6
lectricpharaoh
Caffeinated Neural Net
 
lectricpharaoh's Avatar
 
Join Date: Jun 2005
Location: Dry west coast of Canada
Posts: 1,033
Rep Power: 5 lectricpharaoh will become famous soon enough
Quote:
Originally Posted by irish
I have a game for the pc, which takes up the full screen. I want to make a program that will minimize it to the taskbar so that i can do other things while the game is running(e.g. look at a gaming website). How would I go about this, or what code would I use?
Even a fullscreen DirectX game will have a window attached to the process. You should be able to dispatch a 'Windows message' to this window, but whether or not it honors the message and behaves in the 'appropriate' fashion depends on the app. The relevant message here is WM_SYSCOMMAND, with wParam equal to SC_MINIMIZE (or SC_ICON- it's the same thing). Of course, you'll need a handle to the window too.

If this is meaningless to you, then you should grab a tutorial on Windows programming that explains the basics, like window registration, messages, and the window's callback function.
__________________
And once again, Probability proves itself willing to sneak into a back alley and service Drama as would a copper-piece harlot.
- Vaarsuvius, Order of the Stick
lectricpharaoh is offline   Reply With Quote
Old Dec 12th, 2005, 3:43 PM   #7
irish
Programmer
 
Join Date: Nov 2005
Location: Belfast
Posts: 35
Rep Power: 0 irish is an unknown quantity at this point
I may be able to work with some of this, thanks for the help.
irish is offline   Reply With Quote
Old Dec 12th, 2005, 5:31 PM   #8
nnxion
Programming Guru
 
nnxion's Avatar
 
Join Date: Jun 2005
Location: elemental plane
Posts: 1,429
Rep Power: 5 nnxion is on a distinguished road
This might help you get the handle.
__________________
"Employ your time in improving yourself by other men's writings, so that you shall gain easily what others have labored hard for."
-- Socrates
nnxion is offline   Reply With Quote
Old Dec 12th, 2005, 6:06 PM   #9
Dameon
Troll
 
Dameon's Avatar
 
Join Date: Apr 2005
Location: Texas
Posts: 732
Rep Power: 4 Dameon is on a distinguished road
Minimizing a fullscreen DirectX window causes the device context to be lost. Textures and models that were in video memory typically have to be reloaded (notice the delay when switching back). All in all, it works better to run the game in windowed mode.
__________________
MD5(sig) = bcef75433db02e9ad9bf81d6f7c5c270
Dameon is offline   Reply With Quote
Old Dec 13th, 2005, 8:45 AM   #10
irish
Programmer
 
Join Date: Nov 2005
Location: Belfast
Posts: 35
Rep Power: 0 irish is an unknown quantity at this point
The other programs ive seen load the game immediately. No gamers have complained about this program. I am simply asking if someone could tell me how I would go about making a program like this. I will make one no matter what criticism is posted because i know it will benefit me at the end of the day.
irish is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 10:31 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC