Changing the size of the window?
-
Hi all, I have a small crappy problem. When I load a bitmap I retrieve its width and height, and I want to make the screen view the exact same size. However, I also want to prevent the frame being resized over this size, and so I have managed to implement a system which takes care of it. However, all of the code is situated in the Child Frame class, where the maximum tracking sizes are specified. I then go on to use SetWindowRect(). The problem I get though, is that when using SetWindowRect() the whole width of the window AND frame is set the bitmap dimensions, which means part of the bitmap is obsured by the frame. I have implemented my own offset (to account for the frame), and it works on my computer (or any other with a 19inch monitor), the trouble is I have to demo my app on the computers in Uni, and their monitors are 15inches (and I run XP, they run win2k which means the border sizes are different too), which means the frame will be out of sync with the image (I have tested this). Anyway, how could I get it to set the window and view to the right size? Can I obtain a border offset value? or is there a better way of achieving what I want? Cheers all, Alan. "When I left you I was but the learner, now I am the Master" - Darth Vader:mad:
-
Hi all, I have a small crappy problem. When I load a bitmap I retrieve its width and height, and I want to make the screen view the exact same size. However, I also want to prevent the frame being resized over this size, and so I have managed to implement a system which takes care of it. However, all of the code is situated in the Child Frame class, where the maximum tracking sizes are specified. I then go on to use SetWindowRect(). The problem I get though, is that when using SetWindowRect() the whole width of the window AND frame is set the bitmap dimensions, which means part of the bitmap is obsured by the frame. I have implemented my own offset (to account for the frame), and it works on my computer (or any other with a 19inch monitor), the trouble is I have to demo my app on the computers in Uni, and their monitors are 15inches (and I run XP, they run win2k which means the border sizes are different too), which means the frame will be out of sync with the image (I have tested this). Anyway, how could I get it to set the window and view to the right size? Can I obtain a border offset value? or is there a better way of achieving what I want? Cheers all, Alan. "When I left you I was but the learner, now I am the Master" - Darth Vader:mad:
-
Try adjust the rectangle using "AdjustWindowRectEx". Normski. - Professional Windows Programmer