How do I get a window to resize its contents when maximizing?

This is a discussion on How do I get a window to resize its contents when maximizing? within the C++ Programming forums, part of the General Programming Boards category; Hello all, I have a C++ program (with MSVC++ 6.0) that i did on my work computer: the monitor is ...

  1. #1
    Registered User
    Join Date
    Mar 2004
    Posts
    2

    How do I get a window to resize its contents when maximizing?

    Hello all,

    I have a C++ program (with MSVC++ 6.0) that i did on my work computer: the monitor is 1024 X 768. When the user runs the program on his laptop (smaller size monitor), part of the window gets cutoff. I tried adding a maximize buttonon the top right corner and tried it out using a different size monitor, but text boxes, etc on the window get cutoff. Is there an easy way that i can get all the contents of my window to adjust resize when i hit the maximize button, so i can see everything?

    Thanks alot!!!

  2. #2
    Software Developer jverkoey's Avatar
    Join Date
    Feb 2003
    Location
    University of Waterloo
    Posts
    1,903
    only way that i know of to do this is to handle the WM_SIZE message, then get the handle to each item in your window and call SetWindowPos

    msdn link, POW!

    and that will allow you to control the contents of your window when it gets sized

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. WM_CAPTION causing CreateWindowEx() to fail.
    By Necrofear in forum Windows Programming
    Replies: 8
    Last Post: 04-06-2007, 08:23 AM
  2. 6 measly errors
    By beene in forum Game Programming
    Replies: 11
    Last Post: 11-14-2006, 10:06 AM
  3. OpenGL Window
    By Morgul in forum Game Programming
    Replies: 1
    Last Post: 05-15-2005, 12:34 PM
  4. OpenGL and Windows
    By sean345 in forum Game Programming
    Replies: 5
    Last Post: 06-24-2002, 10:14 PM
  5. opengl code not working
    By Unregistered in forum Windows Programming
    Replies: 4
    Last Post: 02-14-2002, 09:01 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21