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. Splitter window headaches

Splitter window headaches

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
3 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.
  • E Offline
    E Offline
    esapp420
    wrote on last edited by
    #1

    Hello all, I need to split/unsplit the main window in a SDI app using a menu command. I have the splitter window set up in the OnCreateClient function so that it checks a bool flag to decide whether to split or not to split, but I cant figure out how to recall the OnCreateClient function after changing the flag so that it will redraw the desired state. Any suggestions? Thanx I miss the beach!

    E 1 Reply Last reply
    0
    • E esapp420

      Hello all, I need to split/unsplit the main window in a SDI app using a menu command. I have the splitter window set up in the OnCreateClient function so that it checks a bool flag to decide whether to split or not to split, but I cant figure out how to recall the OnCreateClient function after changing the flag so that it will redraw the desired state. Any suggestions? Thanx I miss the beach!

      E Offline
      E Offline
      esapp420
      wrote on last edited by
      #2

      Another question that may help me, who calls OnCreateClient, when is it called, and how do I call it? Landlocked in Atlanta . . . I miss the beach!

      S 1 Reply Last reply
      0
      • E esapp420

        Another question that may help me, who calls OnCreateClient, when is it called, and how do I call it? Landlocked in Atlanta . . . I miss the beach!

        S Offline
        S Offline
        soup
        wrote on last edited by
        #3

        Hi, Don't know enough about splitters to really help, but I think chasing the route of 'recalling OnCreateClient' is the wrong way to go. I think MFC calls this to divide the available client area of a frame window up before creation (then it knows how to create the relevant views). I made a class that could replace views, and it could split an existing view, so I would have thought it was possible to do the opposite. I am probably wrong, but maybe try: 1. splitting the main window into 1 (sound stupid, but then you have a splitter created and attached to the frame window) 2. divide the main splitter pane up when splitting 3. replace the main splitter pane with just the single view when unsplitting. This would be how I would approach the problem, though I admit it seems completely unelegant. Sorry I couldn't be of more help, Simon

        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