Newbie question: Controlling window size/position.

This is a discussion on Newbie question: Controlling window size/position. within the C++ Programming forums, part of the General Programming Boards category; Hi, I'm new to c++, using Codewarrior 5, I created a simple console unit conversion program but have not found ...

  1. #1
    Registered User
    Join Date
    Jan 2002
    Posts
    2

    Unhappy Newbie question: Controlling window size/position.

    Hi, I'm new to c++, using Codewarrior 5, I created a simple console unit conversion program but have not found out how to control the size of the window that it opens in. Is this a Compiler setting or a c++ command please?
    Thanks

  2. #2
    Registered User
    Join Date
    Dec 2001
    Posts
    421
    CodeWarrior.... is that a Mac thing??? Coz as far as I know it's purely for Macs (please feel free to correct me if i'm wrong).

    i think no matter what you're in the wrong forum but that's kewl.

    if you're using a Mac, i can't help you.. if you're using windows, then check out MoveWindow() or SetWindowPos()... they will help you control window size an position...

    if you are looking to prevent users from resizing or something like that.. then you need to handle the WM_SIZING message, and alter the value of the parameters of the rectangle structure that you can reference through either the wParam or lParam parameter.

    hope this helps
    U.
    Quidquid latine dictum sit, altum sonatur.
    Whatever is said in Latin sounds profound.

  3. #3
    Registered User
    Join Date
    Jan 2002
    Posts
    2

    Thanks

    Thanks for the help. I'll try it out. I actually have the Mac and Windows versions of the Codewarrior program so I can do cross-platform stuff. It seems to work pretty well. Thanks again for the suggestions.
    C

  4. #4
    Registered User
    Join Date
    Dec 2001
    Posts
    421
    no problem
    Quidquid latine dictum sit, altum sonatur.
    Whatever is said in Latin sounds profound.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Why only 32x32? (OpenGL) [Please help]
    By Queatrix in forum Game Programming
    Replies: 2
    Last Post: 01-23-2006, 01:39 PM
  2. Window scrollbar
    By maxorator in forum Windows Programming
    Replies: 2
    Last Post: 10-07-2005, 12:31 PM
  3. Linking OpenGL in Dev-C++
    By linkofazeroth in forum Game Programming
    Replies: 4
    Last Post: 09-13-2005, 10:17 AM
  4. OpenGL Window
    By Morgul in forum Game Programming
    Replies: 1
    Last Post: 05-15-2005, 12:34 PM
  5. How to change window style at runtime?
    By Mr. Bitmap in forum Windows Programming
    Replies: 5
    Last Post: 06-09-2002, 04:49 PM

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