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. CSplitter and changing views.

CSplitter and changing views.

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

    I am using an SDI application with a splitter window and I want to change the view in one of the panes depending on what menu item is selected (e.g. go from a TreeView to a ListView). It seems to work but when redrawing the whole thing looks like a dog's breakfast. When I resize the splitter it seems to then redraw okay. Any suggestions? Am I not getting the size correct? I also tried Invalidate() for the frame window but it didn't seems to be sucessful either. ... m_Split2.GetColumnInfo(1,cx,ctemp); m_Split2.GetRowInfo(0,cy,ctemp); m_Split2.DeleteView(0,1); m_Split2.CreateView(0,1,RUNTIME_CLASS(CMyListView),CSize(cx,cy),NULL); GetActiveDocument()->UpdateAllViews(NULL); ... Many thanks:) Adam. My world tour What I do now.. "I spent a lot of my money on booze, birds and fast cars. The rest I just squandered" George Best. "I suppose if it was a choice between bon jovi and the interior of a car, the car would win, even it didnt have a radio and I had to sit in silence" James Simpson on Light Metal.

    R 1 Reply Last reply
    0
    • A adamUK

      I am using an SDI application with a splitter window and I want to change the view in one of the panes depending on what menu item is selected (e.g. go from a TreeView to a ListView). It seems to work but when redrawing the whole thing looks like a dog's breakfast. When I resize the splitter it seems to then redraw okay. Any suggestions? Am I not getting the size correct? I also tried Invalidate() for the frame window but it didn't seems to be sucessful either. ... m_Split2.GetColumnInfo(1,cx,ctemp); m_Split2.GetRowInfo(0,cy,ctemp); m_Split2.DeleteView(0,1); m_Split2.CreateView(0,1,RUNTIME_CLASS(CMyListView),CSize(cx,cy),NULL); GetActiveDocument()->UpdateAllViews(NULL); ... Many thanks:) Adam. My world tour What I do now.. "I spent a lot of my money on booze, birds and fast cars. The rest I just squandered" George Best. "I suppose if it was a choice between bon jovi and the interior of a car, the car would win, even it didnt have a radio and I had to sit in silence" James Simpson on Light Metal.

      R Offline
      R Offline
      Ryan Binns
      wrote on last edited by
      #2

      http://www.codeproject.com/docview/switchingviews.asp[^] should help :) Ryan Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
      Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"

      A 1 Reply Last reply
      0
      • R Ryan Binns

        http://www.codeproject.com/docview/switchingviews.asp[^] should help :) Ryan Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
        Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"

        A Offline
        A Offline
        adamUK
        wrote on last edited by
        #3

        Ryan, You de man! Thanks :) Adam. My world tour What I do now.. "I spent a lot of my money on booze, birds and fast cars. The rest I just squandered" George Best. "I suppose if it was a choice between bon jovi and the interior of a car, the car would win, even it didnt have a radio and I had to sit in silence" James Simpson on Light Metal.

        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