Thread: 800x600 res Applications..?

  1. #1
    Registered User
    Join Date
    Apr 2008
    Posts
    610

    800x600 res Applications..?

    How do i go about ensuring that my application window will show well in all resolutions (from Crt - High Res LCD)...

    Or do i rather ensure that when i create Window my size in no larger than 800x600... ?

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    I'm not sure, but I believe you want to catch the VM_NCCREATE and/or VM_CREATE and set the size of the window within the CREATESRUCT.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #3
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    It's a complex issue from the design point of view. Usually you design for on one resolution (preferably the minimum one) and make an effort to ensure a fluid design (some like to call it Liquid).

    So, assuming you set 800x600 as the minimum requirements, you lay out your controls for this window size. Then what?

    Well, this is where it gets complicated. You have to establish what controls are allowed to move and what controls are allowed to resize when the window changes sizes, coding this into the resize events you are catching (I can't help with Windows API or MFC. Only WxWidgets).

    Observe some applications and look at how some controls remain still and unchanged, while others move and/or change size in the window when you resize it. That's what you would ideally want to achieve. Some tools offer easy shortcuts for this. WxWidgets (a GUI api), for instance offers Sizers which makes the design of fluid layouts a kid's play (after you get used to the philosophy behind, that is). MFC and Win32 API will force you to code the whole thing EDIT: unless you have access to RAD tools with click & drag control placement which usually offer their own methods. But as long as you know how you want a window to increase its size, it's just not that difficult, I'm sure.
    Last edited by Mario F.; 06-11-2008 at 07:51 AM.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  4. #4
    Registered User
    Join Date
    Apr 2008
    Posts
    610
    Quote Originally Posted by Mario F. View Post
    It's a complex issue from the design point of view. Usually you design for on one resolution (preferably the minimum one) and make an effort to ensure a fluid design (some like to call it Liquid).

    So, assuming you set 800x600 as the minimum requirements, you lay out your controls for this window size. Then what?

    Well, this is where it gets complicated. You have to establish what controls are allowed to move and what controls are allowed to resize when the window changes sizes, coding this into the resize events you are catching (I can't help with Windows API or MFC. Only WxWidgets).

    Observe some applications and look at how some controls remain still and unchanged, while others move and/or change size in the window when you resize it. That's what you would ideally want to achieve. Some tools offer easy shortcuts for this. WxWidgets (a GUI api), for instance offers Sizers which makes the design of fluid layouts a kid's play (after you get used to the philosophy behind, that is). MFC and Win32 API will force you to code the whole thing EDIT: unless you have access to RAD tools with click & drag control placement which usually offer their own methods. But as long as you know how you want a window to increase its size, it's just not that difficult, I'm sure.
    Came across functions such as "GetSystemMetrics" and "GetTextMetrics" which retrieves the window size per resolution and text size per resolution... My concerns as you mention are controls within the windows, such as edit controls and buttons... I guess the best option is to design for 800x600, but then how would the application look in a screen resolution of 1280X1024? Is it going to stretch or something?
    Last edited by csonx_p; 06-12-2008 at 02:10 AM.

  5. #5
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Of course. You have to stretch your controls to a larger width/height, but I would usually design for 1024x768 or 1280x1024 resolution, as they are pretty common today.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  6. #6
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Changing resolutions will not deface your controls in any way (with one exception). Any operating system offering a GUI worth its salt will automatically scale you controls accordingly. The end result will still be a window with crisp looking controls. So if you layout for, say 800x600, and then change the resolution for 1024x768, your window will look smaller on the screen and all controls will be scaled accordingly.

    Basically what this means is that as far as resolutions are concerned, the operating system will do that for you scaling things on screen accordingly (like just it does with your applications). But because changing resolutions affect the free space outside the window, usually we want to allow users to resize their windows. On that case you need to catch window resize events (do not use window paint events or load events. A resize event is also handled during window first load) and move and resize your controls as you wish.

    ...

    The only exception to the resolution changing not affecting the detail and crispness of your screen is if you are using a wide screen monitor and want to look at default resolution ratios (or the other way around). Typical resolutions have a ratio of 1.3 (jut divide 800 by 600 for instance). Widescreen monitors offer resolutions with ratios of 1.6 and higher I reckon. When displaying resolutions with different ratios your screen may look blurred. You should not worry, because a) it's dependent on monitor quality and b) it's only the result of someone using the wrong suggested resolution for their screen type which basically means is not your problem.

    EDIT: In other words and to make this short, your only concern should be the current window size, not the resolution of the screen.

    1 - Set a minimum requirements resolution ( 800x600 is a common choice depending on the application)
    2 - Design you windows content with this resolution in mind.
    3 - Catch window resize events, read the current values from within and move and resize you controls accordingly.
    Last edited by Mario F.; 06-12-2008 at 05:48 AM.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  7. #7
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by Mario F. View Post
    Typical resolutions have a ratio of 1.3 (jut divide 800 by 600 for instance). Widescreen monitors offer resolutions with ratios of 1.6 and higher I reckon.
    Standard resolution is 4/3 (1024x768, 1280x1024 for example). Widescreen is 16/9 (1280x720 for example), or 16/10 (1920x1200 for example).
    16/10 is more common for today's computer screens, but TVs are still 16/9. 4/3 monitors exist for lower-end computer screens and laptops and 4/3 TVs are being phased out, pretty much. Or will be.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  8. #8
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,868
    Quote Originally Posted by Mario F. View Post
    The only exception to the resolution changing not affecting the detail and crispness of your screen is if you are using a wide screen monitor

    Changing the font ratio in Display properties can have bad effects, especially on owner draw controls.
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

  9. #9
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195
    If you are doing manual blitting, just resample the image to the higher resolution. You wont be able to tell its runnign in higher reslolution, but at least it will look normal.

  10. #10
    Registered User
    Join Date
    Apr 2008
    Posts
    610
    Quote Originally Posted by Elysia View Post
    Standard resolution is 4/3 (1024x768, 1280x1024 for example). Widescreen is 16/9 (1280x720 for example), or 16/10 (1920x1200 for example).
    16/10 is more common for today's computer screens, but TVs are still 16/9. 4/3 monitors exist for lower-end computer screens and laptops and 4/3 TVs are being phased out, pretty much. Or will be.
    Tried running a simple application (window with a gray shaded rectangle with one object drawn unto it) on an NT4 Machine which has a max screen resolution of 800x600 and Max of 16 colors. Well this application window is small enough to fit any resolution but problem i picked up was the gray shade on rectangle was more lighter and showing lines on background instead of full shade. Also, the application was flickering which was not happening on my XP PC... Thought XP was NT as well

  11. #11
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,868
    Win 2000 was an NT core, XP is not.

    If the NT PC was running 800x600 in 16 colours (I think you mean 16 bit) it probably has a VERY slow graphics card. It may mot be possible to not flicker, depending on your app.

    If the NT machine is your target then develop/test on that machine and adjust accordingly.

    If the NT is not a required target machine, ignore it, some machines are too slow/old to modify your apps to run on.
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

  12. #12
    Registered User
    Join Date
    Apr 2008
    Posts
    610
    Quote Originally Posted by novacain View Post
    If the NT machine is your target then develop/test on that machine and adjust accordingly.
    I suppose this is what i should be doing...

  13. #13
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    Quote Originally Posted by Elysia View Post
    Standard resolution is 4/3 (1024x768, 1280x1024 for example). Widescreen is 16/9 (1280x720 for example), or 16/10 (1920x1200 for example).
    16/10 is more common for today's computer screens, but TVs are still 16/9. 4/3 monitors exist for lower-end computer screens and laptops and 4/3 TVs are being phased out, pretty much. Or will be.
    1280x1024 isn't 4/3, it's 5/4. Sorry, just nitpicking.
    Quote Originally Posted by Mario F. View Post
    Changing resolutions will not deface your controls in any way (with one exception). Any operating system offering a GUI worth its salt will automatically scale you controls accordingly. The end result will still be a window with crisp looking controls. So if you layout for, say 800x600, and then change the resolution for 1024x768, your window will look smaller on the screen and all controls will be scaled accordingly.
    Windows XP does not scale controls... and if it did I'd wish I could beat up the guy who added it.
    Last edited by maxorator; 06-17-2008 at 02:30 AM.
    "The Internet treats censorship as damage and routes around it." - John Gilmore

  14. #14
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by novacain View Post
    Win 2000 was an NT core, XP is not.
    Do you have any documentation to validate this, as I have never seen any claim from MS that the XP kernel is not based on Windows NT - yes, they did some UI changes, but the core of the OS is still based on NT.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  15. #15
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by maxorator View Post
    1280x1024 isn't 4/3, it's 5/4. Sorry, just nitpicking.
    Oh. You're right. It should be 1280x960 (4/3).
    Not very used to that resolution, hehe.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Get Installed applications list and applications activity
    By arunarora in forum C++ Programming
    Replies: 5
    Last Post: 05-25-2009, 09:41 AM
  2. C programing doubt
    By sivasankari in forum C Programming
    Replies: 2
    Last Post: 04-29-2008, 09:19 AM
  3. A question about windows programming
    By Hussain Hani in forum Windows Programming
    Replies: 16
    Last Post: 05-23-2007, 07:38 AM
  4. Combobox problem
    By gargamel in forum Windows Programming
    Replies: 2
    Last Post: 05-06-2005, 01:37 PM