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 resize the MDI child window at startup

How to resize the MDI child window at startup

Scheduled Pinned Locked Moved C / C++ / MFC
questiontutorial
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.
  • M Offline
    M Offline
    mr2003
    wrote on last edited by
    #1

    Hi, I would like to be able to resize the MDI before start up, I mean, i want to make it really small, How can I resize it in my code? Ehsan Behboudi

    J 1 Reply Last reply
    0
    • M mr2003

      Hi, I would like to be able to resize the MDI before start up, I mean, i want to make it really small, How can I resize it in my code? Ehsan Behboudi

      J Offline
      J Offline
      John R Shaw
      wrote on last edited by
      #2

      The simplest solution I can think of:

      BOOL CChildFrame::PreCreateWindow(CREATESTRUCT& cs)
      {
      // TODO: Modify the Window class or styles here by modifying
      // the CREATESTRUCT cs
      cs.y = my.y;
      cs.x = my.x;
      cs.cx = my.cx;
      cx.cy = my.cy;
      if( !CNewMDIChildWnd::PreCreateWindow(cs) )
      return FALSE;

      return TRUE;
      

      }

      INTP

      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