Click to See Complete Forum and Search --> : Resolution: How to get the info and how to resize it
mrRee
June 6th, 2005, 10:58 PM
I had wrote a program on 1024x768 screen resolution...and when I try to run it on 800x600, the windows and all the button looks bigger..
How can I get the screen resolution from the computer that run the program...
and how can I resize the application to fit the resolution....any help is appreciated
//no MFC stuff please :)
golanshahar
June 7th, 2005, 02:20 AM
getting the resulotion is simple you can just call ::GetSystemMetrics () Api with SM_CXSCREEN and SM_CYSCREEN and you will have the screen size.
regurding your application i dont know how you design it, are you creating the controls at run time? and using SetWindowPos to place them? or u build the whole gui at design time?
if i helped dont forget to rate :-)
Cheers
mrRee
June 7th, 2005, 06:45 AM
thanx...I use dialog box as my window and create it at design time...
golanshahar
June 7th, 2005, 11:03 AM
if you dont have a lot of controls and dilalogs you might consider arrange all the controls + dialogs with ::SetWindowPos(..) api acrroding to the resolution.
i cant think of somehting else in the moment :-(
if i helped dont forget to rate :-)
Cheers
mrRee
June 7th, 2005, 06:59 PM
if you dont have a lot of controls and dilalogs you might consider arrange all the controls + dialogs with ::SetWindowPos(..) api acrroding to the resolution.
i cant think of somehting else in the moment :-(
if i helped dont forget to rate :-)
Cheers
actually that was my real problem...because the dialog box consist a load of controls...and the application also will call another dialog boxes for different usage...
//don't worry...rate it is :)
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.