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. How To : center a CFormView in a SDI app ???

How To : center a CFormView in a SDI app ???

Scheduled Pinned Locked Moved C / C++ / MFC
questiontutorial
4 Posts 4 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.
  • L Offline
    L Offline
    Luc Bergeron
    wrote on last edited by
    #1

    How do i get my cformviews to be centered in the CMainFrame ??? I've tried to put a routine in PreCreateWindow but that didn't work ??? If anyone has any suggestion please let me know :) Thanx in advance :)

    C K 2 Replies Last reply
    0
    • L Luc Bergeron

      How do i get my cformviews to be centered in the CMainFrame ??? I've tried to put a routine in PreCreateWindow but that didn't work ??? If anyone has any suggestion please let me know :) Thanx in advance :)

      C Offline
      C Offline
      Cristi Posea
      wrote on last edited by
      #2

      You should use a layout manager (see the Dialogs section here at codeproject) to move the controls when the view is resized. It is also possible to resize some of the controls with the view.

      1 Reply Last reply
      0
      • L Luc Bergeron

        How do i get my cformviews to be centered in the CMainFrame ??? I've tried to put a routine in PreCreateWindow but that didn't work ??? If anyone has any suggestion please let me know :) Thanx in advance :)

        K Offline
        K Offline
        Kurt 0
        wrote on last edited by
        #3

        In OnInitalUpdate just call CenterWindow();

        U 1 Reply Last reply
        0
        • K Kurt 0

          In OnInitalUpdate just call CenterWindow();

          U Offline
          U Offline
          User 749
          wrote on last edited by
          #4

          >In OnInitialUpdate just call CenterWindow(); That might just work... for an MDI child window, not a SDI view!! Yours, Brian Hart

          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