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. Communication with Splitters

Communication with Splitters

Scheduled Pinned Locked Moved C / C++ / MFC
helpc++question
1 Posts 1 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.
  • T Offline
    T Offline
    telstar
    wrote on last edited by
    #1

    EDIT: I Solved my own problem I moved my button-logic to the MainFrm.cpp class, and used the GetPane() function to access the correct pane. I guess the best solutions are the ones you come up with yourself. ******************************************************************************************** Original Post Below: I've read a number of posts here about communicating when using splitters, but I'm still having a problem, so I'd appreciate any help. I have an SDI application with a toolbar and three views ... one of which is a CHtmlView derived view. I'm trying to control the web browser control using the toolbar buttons. Here's what I have: ------------------- I have a pointer to the MainFrm object in my MyApp.cpp (defined MyApp.h). In my MainFrm.cpp, I'm using the RUNTIME_CLASS(CClassType) macro to create each of the three splitter panes, and I'm saving pointers to each views. In MyApp.cpp, I have a message handler for the user clicking the "Back" button:void CMyApp::OnBack(){ CMainFrame* p_localMainFrameRef = (CMainFrame*) p_viewMain; CMyAppHTMLView* p_localWebFrameRef = (CMyAppHTMLView*)(p_localMainFrameRef->p_viewWeb); p_localWebFrameRef->GoHome(); }
    I'm getting the following error when I click the "Back" button: Unhandled exception at 0x7c1a8130 (mfc71d.dll) in YourApplication.exe: 0xC0000005: Access violation reading location 0x00003972. Can anyone lend some advice as to what I'm doing wrong ... or suggest a better approach to allowing me to communicate between frames, and with the toolbar? Thanks very much, telstar

    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