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. Resizing a CFormView class

Resizing a CFormView class

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
2 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.
  • G Offline
    G Offline
    Georgi Atanasov
    wrote on last edited by
    #1

    Hi everyone! I need to resize all the controls in a CFormView class on WM_SIZE message. I tried to resize each control seperately but it didn't worked. Also tried the code from OnInitialUpdate(): CFormView::OnInitialUpdate(); GetParentFrame()->RecalcLayout(); ResizeParentToFit(); but it does not resizes the controls... Any solutions of the problem? Thanks in advance! Gogou

    M 1 Reply Last reply
    0
    • G Georgi Atanasov

      Hi everyone! I need to resize all the controls in a CFormView class on WM_SIZE message. I tried to resize each control seperately but it didn't worked. Also tried the code from OnInitialUpdate(): CFormView::OnInitialUpdate(); GetParentFrame()->RecalcLayout(); ResizeParentToFit(); but it does not resizes the controls... Any solutions of the problem? Thanks in advance! Gogou

      M Offline
      M Offline
      Maximilien
      wrote on last edited by
      #2

      Gogou wrote: I tried to resize each control seperately but it didn't worked. What happened ? the WM_SIZE callback is the place to do it, maybe you get the wrong RECT ? in the handler, you get the client rect ( GetClientRect ), this will give you the client rect of the formview, once that's done, you MoveWindow each of the controls you want to move. Max.

      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