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. CSplitterWnd::GetPane asserts with CFormView pane

CSplitterWnd::GetPane asserts with CFormView pane

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

    I have a working static splitter frame and need to retrieve pane based on CFormView. I am getting assertion in GetPane MFC (4.0 / VC 6.0) function , and only on this type of splitter pane. Plain CView works fine. I did search on similar problems and it looks like the CFormView is the problem. Any suggestion how to fix this? Please no “ upgrade to xxxx”, not an option. CWnd* CSplitterWnd::GetPane(int row, int col) const { ASSERT_VALID(this); CWnd* pView = GetDlgItem(IdFromRowCol(row, col)); ASSERT(pView != NULL); // panes can be a CWnd, but are usually CViews return pView; } Your help is as allways appreciated. Cheers Vaclav

    S C 2 Replies Last reply
    0
    • V Vaclav_

      I have a working static splitter frame and need to retrieve pane based on CFormView. I am getting assertion in GetPane MFC (4.0 / VC 6.0) function , and only on this type of splitter pane. Plain CView works fine. I did search on similar problems and it looks like the CFormView is the problem. Any suggestion how to fix this? Please no “ upgrade to xxxx”, not an option. CWnd* CSplitterWnd::GetPane(int row, int col) const { ASSERT_VALID(this); CWnd* pView = GetDlgItem(IdFromRowCol(row, col)); ASSERT(pView != NULL); // panes can be a CWnd, but are usually CViews return pView; } Your help is as allways appreciated. Cheers Vaclav

      S Offline
      S Offline
      Stephen Hewitt
      wrote on last edited by
      #2

      Which asset?

      Steve

      1 Reply Last reply
      0
      • V Vaclav_

        I have a working static splitter frame and need to retrieve pane based on CFormView. I am getting assertion in GetPane MFC (4.0 / VC 6.0) function , and only on this type of splitter pane. Plain CView works fine. I did search on similar problems and it looks like the CFormView is the problem. Any suggestion how to fix this? Please no “ upgrade to xxxx”, not an option. CWnd* CSplitterWnd::GetPane(int row, int col) const { ASSERT_VALID(this); CWnd* pView = GetDlgItem(IdFromRowCol(row, col)); ASSERT(pView != NULL); // panes can be a CWnd, but are usually CViews return pView; } Your help is as allways appreciated. Cheers Vaclav

        C Offline
        C Offline
        Chuck OToole
        wrote on last edited by
        #3

        Good Lord, Man, it's only 4 lines of code, 2 of them are ASSERTs. If you have the code, use the debugger and step into the function and see why it's blowing up. There are only 2 possibilities in that code, either the current object is not instantiated as a window (ASSERT_VALID) or the arguments you passed (row, column) do not represent a valid view (bad "pane coordinates") This should be easy enough to debug, once you know what it's complaining about, you'll know what you did wrong.

        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