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. Sizing Child Window

Sizing Child Window

Scheduled Pinned Locked Moved C / C++ / MFC
tutorial
4 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.
  • J Offline
    J Offline
    Joseph 0
    wrote on last edited by
    #1

    I am currently writing an app that uses multiple document types. When the user creates a new file, I would like the size of the generated child window to depend on the document type. If anyone has any suggestions on how to accomplish this, please let me know.

    S 1 Reply Last reply
    0
    • J Joseph 0

      I am currently writing an app that uses multiple document types. When the user creates a new file, I would like the size of the generated child window to depend on the document type. If anyone has any suggestions on how to accomplish this, please let me know.

      S Offline
      S Offline
      Sam Hobbs
      wrote on last edited by
      #2

      We need a bit more information. Are you using CFormView? What criteria do you want to use to determine the size used for each view?

      J 1 Reply Last reply
      0
      • S Sam Hobbs

        We need a bit more information. Are you using CFormView? What criteria do you want to use to determine the size used for each view?

        J Offline
        J Offline
        Joseph 0
        wrote on last edited by
        #3

        I figured one way out already, but thanks for replying. The way I am doing it I have a seperate Child Frame class for each document type. Then i just modify the window's size in the Child Frame's PreCreateWindow function. If you know of a better way to accomplish this, though, feel free to let me know! Thanks again!

        S 1 Reply Last reply
        0
        • J Joseph 0

          I figured one way out already, but thanks for replying. The way I am doing it I have a seperate Child Frame class for each document type. Then i just modify the window's size in the Child Frame's PreCreateWindow function. If you know of a better way to accomplish this, though, feel free to let me know! Thanks again!

          S Offline
          S Offline
          Sam Hobbs
          wrote on last edited by
          #4

          If you are using CFormView, probably you can use ResizeParentToFit() in your OnInitialUpdate().

          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