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. Should be an easy question.. Splitter

Should be an easy question.. Splitter

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

    Hello, How can I permanently set the splitter size? For example: Instead of the Left / Right view I have a split from left to right so I have a top and a bottom. I want the bottom view to always stay the same height even when the window is being resized. I'm a newbie with splitters and am unsure how I can keep my bottom view set to a permanent height. I assume I should handle MainFrame WM_SIZE and somehow set the splitter location.. Any ideas? Thanks, Rob

    G G 3 Replies Last reply
    0
    • R RobJones

      Hello, How can I permanently set the splitter size? For example: Instead of the Left / Right view I have a split from left to right so I have a top and a bottom. I want the bottom view to always stay the same height even when the window is being resized. I'm a newbie with splitters and am unsure how I can keep my bottom view set to a permanent height. I assume I should handle MainFrame WM_SIZE and somehow set the splitter location.. Any ideas? Thanks, Rob

      G Offline
      G Offline
      Georgi Atanasov
      wrote on last edited by
      #2

      try this: CRect rect; GetClientRect(&rect); int x = rect.Width()/2; Then set the width of your pane = x Regards

      1 Reply Last reply
      0
      • R RobJones

        Hello, How can I permanently set the splitter size? For example: Instead of the Left / Right view I have a split from left to right so I have a top and a bottom. I want the bottom view to always stay the same height even when the window is being resized. I'm a newbie with splitters and am unsure how I can keep my bottom view set to a permanent height. I assume I should handle MainFrame WM_SIZE and somehow set the splitter location.. Any ideas? Thanks, Rob

        G Offline
        G Offline
        Georgi Atanasov
        wrote on last edited by
        #3

        Sorry, this isn't a solution to your problem:)

        1 Reply Last reply
        0
        • R RobJones

          Hello, How can I permanently set the splitter size? For example: Instead of the Left / Right view I have a split from left to right so I have a top and a bottom. I want the bottom view to always stay the same height even when the window is being resized. I'm a newbie with splitters and am unsure how I can keep my bottom view set to a permanent height. I assume I should handle MainFrame WM_SIZE and somehow set the splitter location.. Any ideas? Thanks, Rob

          G Offline
          G Offline
          Gary R Wheeler
          wrote on last edited by
          #4

          CSplitterWnd has methods for getting and setting the dimensions of static splitters: GetRowInfo, SetRowInfo, GetColumnInfo, and SetColumnInfo. In your frame WM_SIZE handler you can compute the size of the splitter and call one or more of these methods to set it. After you have the splitter(s) set the way you want, you have to call RecalcLayout() to update the splitter layout.


          Software Zen: delete this;

          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