Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Scaling a window without obscuring image.

Scaling a window without obscuring image.

Scheduled Pinned Locked Moved C / C++ / MFC
questiongraphicsgame-dev
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Z Offline
    Z Offline
    Zergon
    wrote on last edited by
    #1

    Hi, I've been given an old project written in VC6. This project uses openGL and in a window draws object meshes. The initial size is set to x = 800 , y = 800. How can i lock the window to scale evenly so x and y stay the same. I dont want to allow the window to have unequal x and y values. Is there a property i can use, i know its possible in vc7+ but i cant seem to find anything similar in vc6, do i have to hardcode such a function where it detects the event of resizing when done change the x or y depending which one is smaller to be equal to the largest value? [Eg. After user stretches the window a bit, x = 800, y = 850 so i will make x = 850?].

    N 1 Reply Last reply
    0
    • Z Zergon

      Hi, I've been given an old project written in VC6. This project uses openGL and in a window draws object meshes. The initial size is set to x = 800 , y = 800. How can i lock the window to scale evenly so x and y stay the same. I dont want to allow the window to have unequal x and y values. Is there a property i can use, i know its possible in vc7+ but i cant seem to find anything similar in vc6, do i have to hardcode such a function where it detects the event of resizing when done change the x or y depending which one is smaller to be equal to the largest value? [Eg. After user stretches the window a bit, x = 800, y = 850 so i will make x = 850?].

      N Offline
      N Offline
      Nishad S
      wrote on last edited by
      #2

      use WM_SIZING message

      - NS - [ODBaseBtn]

      Z 1 Reply Last reply
      0
      • N Nishad S

        use WM_SIZING message

        - NS - [ODBaseBtn]

        Z Offline
        Z Offline
        Zergon
        wrote on last edited by
        #3

        Thank you

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups