Click here to Skip to main content
15,893,266 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralNeed help with C++ vs C# resource problem Pin
Matt Philmon18-Feb-04 19:32
Matt Philmon18-Feb-04 19:32 
GeneralApplication Priority - when minimized Pin
krithika_Ramanujam18-Feb-04 19:21
krithika_Ramanujam18-Feb-04 19:21 
Questionneed sql query? Pin
murali_utr18-Feb-04 18:48
murali_utr18-Feb-04 18:48 
AnswerRe: need sql query? Pin
22491719-Feb-04 0:49
22491719-Feb-04 0:49 
GeneralEdit Control - Word Wrap Pin
monrobot1318-Feb-04 17:53
monrobot1318-Feb-04 17:53 
GeneralRe: Edit Control - Word Wrap Pin
Paul Hooper18-Feb-04 21:38
Paul Hooper18-Feb-04 21:38 
GeneralRe: Edit Control - Word Wrap Pin
monrobot1320-Feb-04 7:03
monrobot1320-Feb-04 7:03 
GeneralCommunication with Splitters Pin
telstar18-Feb-04 17:30
telstar18-Feb-04 17:30 
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
Generalclistbox greying Pin
SVPG18-Feb-04 17:02
SVPG18-Feb-04 17:02 
GeneralRe: clistbox greying Pin
sps-itsec4619-Feb-04 3:20
sps-itsec4619-Feb-04 3:20 
Generaluse a dll to link 2 diff Static Lib Pin
braderbear18-Feb-04 16:59
braderbear18-Feb-04 16:59 
GeneralRe: use a dll to link 2 diff Static Lib Pin
Prakash Nadar18-Feb-04 19:11
Prakash Nadar18-Feb-04 19:11 
GeneralComboBox display problem on Windows 98 Pin
J.B.18-Feb-04 16:25
J.B.18-Feb-04 16:25 
GeneralRe: ComboBox display problem on Windows 98 Pin
krithika_Ramanujam18-Feb-04 19:48
krithika_Ramanujam18-Feb-04 19:48 
GeneralRe: ComboBox display problem on Windows 98 Pin
J.B.19-Feb-04 3:04
J.B.19-Feb-04 3:04 
GeneralRe: ComboBox display problem on Windows 98 Pin
Michael Dunn19-Feb-04 4:44
sitebuilderMichael Dunn19-Feb-04 4:44 
GeneralRe: ComboBox display problem on Windows 98 Pin
J.B.19-Feb-04 23:12
J.B.19-Feb-04 23:12 
Questionhow to differ the CD_ROM track mode? Pin
longdafeng18-Feb-04 15:06
longdafeng18-Feb-04 15:06 
GeneralMFC substring Pin
Dev57818-Feb-04 15:01
Dev57818-Feb-04 15:01 
GeneralRe: MFC substring Pin
paulb18-Feb-04 16:49
paulb18-Feb-04 16:49 
GeneralRe: MFC substring Pin
Robert A. T. Káldy19-Feb-04 2:59
Robert A. T. Káldy19-Feb-04 2:59 
GeneralOleDB programming Pin
정인보18-Feb-04 14:54
정인보18-Feb-04 14:54 
GeneralRe: OleDB programming Pin
Steve S19-Feb-04 7:34
Steve S19-Feb-04 7:34 
GeneralSending output to an arbitrary console window Pin
ddellis18-Feb-04 13:47
ddellis18-Feb-04 13:47 
GeneralRe: Sending output to an arbitrary console window Pin
valikac18-Feb-04 14:34
valikac18-Feb-04 14:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.