Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem with MFC and SDI

Status
Not open for further replies.

Guest_imported

New member
Joined
Jan 1, 1970
Messages
0
here's my problem.

CFrameWnd* pMainWnd = (CFrameWnd*)AfxGetMainWnd();
CView* pView = pMainWnd->GetActiveView();

that is to access the active view in my SDI richeditview from a dialog box.
unfortunately i can't seem to access the functions of the class that i inherited (correct term?) from CRichEditView.

how do i access these functions and variables?
 
If that's what you want, shouldn't you cast the view like this?

CFrameWnd* pMainWnd = (CFrameWnd*)AfxGetMainWnd();
CRichEditView* pRichEditView =
(CRichEditView*)pMainWnd->GetActiveView();
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top