Click here to Skip to main content
15,911,646 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow do I implement serialization from my Cview class Pin
mr200328-Jun-01 14:45
mr200328-Jun-01 14:45 
QuestionHow do I activate the view my mouse goes over in an MDI app ? Pin
Christian Graus28-Jun-01 14:26
protectorChristian Graus28-Jun-01 14:26 
AnswerRe: How do I activate the view my mouse goes over in an MDI app ? Pin
#realJSOP29-Jun-01 4:09
professional#realJSOP29-Jun-01 4:09 
GeneralRe: How do I activate the view my mouse goes over in an MDI app ? Pin
Christian Graus29-Jun-01 21:04
protectorChristian Graus29-Jun-01 21:04 
GeneralRe: How do I activate the view my mouse goes over in an MDI app ? Pin
Neville Franks29-Jun-01 22:06
Neville Franks29-Jun-01 22:06 
GeneralRe: How do I activate the view my mouse goes over in an MDI app ? Pin
Christian Graus30-Jun-01 0:32
protectorChristian Graus30-Jun-01 0:32 
QuestionHow do I stop my view from being erased after serialising the document??? Pin
Ananya Sen Gupta28-Jun-01 11:50
Ananya Sen Gupta28-Jun-01 11:50 
AnswerRe: How do I stop my view from being erased after serialising the document??? Pin
Christian Graus28-Jun-01 14:12
protectorChristian Graus28-Jun-01 14:12 
To get a pointer to the View from your document:

CFrameWnd *pFrameWnd = (CFrameWnd *)AfxGetMainWnd();
ASSERT (pFrameWnd != NULL && pFrameWnd->IsKindOf(RUNTIME_CLASS(CMDIFrameWnd)));
pFrameWnd = ((CMDIFrameWnd *)pFrameWnd)->GetActiveFrame();
CMyView * pView = (CMyView*)pFrameWnd->GetActiveView();


This is a generic method - it works from anywhere, but only works if your document is attached to the active view.

Your other problem is a mystery to me. Could you post some code to show what you're doing ?



Christian

#include "std_disclaimer.h"

People who love sausage and respect the law should never watch either one being made.

The things that come to those who wait are usually the things left by those who got there first.
GeneralMX Records and DNS Pin
28-Jun-01 10:55
suss28-Jun-01 10:55 
GeneralDeviceIoControl() question Pin
28-Jun-01 10:34
suss28-Jun-01 10:34 
GeneralSystem Menu Pin
Libor Matejka28-Jun-01 9:56
Libor Matejka28-Jun-01 9:56 
GeneralRe: System Menu Pin
Christian Graus28-Jun-01 14:13
protectorChristian Graus28-Jun-01 14:13 
GeneralRe: System Menu Pin
Libor Matejka28-Jun-01 18:14
Libor Matejka28-Jun-01 18:14 
GeneralRe: System Menu Pin
Michael Martin28-Jun-01 19:32
professionalMichael Martin28-Jun-01 19:32 
GeneralRe: System Menu Pin
Libor Matejka29-Jun-01 2:52
Libor Matejka29-Jun-01 2:52 
QuestionNotify should i return 0 ? Pin
28-Jun-01 9:53
suss28-Jun-01 9:53 
GeneralFunction passed in argument Pin
28-Jun-01 9:30
suss28-Jun-01 9:30 
GeneralRe: Function passed in argument Pin
Igor Sukhov28-Jun-01 11:06
Igor Sukhov28-Jun-01 11:06 
GeneralRe: Function passed in argument Pin
28-Jun-01 11:14
suss28-Jun-01 11:14 
GeneralExport classes with a template method Pin
28-Jun-01 9:29
suss28-Jun-01 9:29 
GeneralTone generation Pin
Roy28-Jun-01 8:35
Roy28-Jun-01 8:35 
GeneralRe: Tone generation Pin
Jim A. Johnson28-Jun-01 8:45
Jim A. Johnson28-Jun-01 8:45 
GeneralRe: Tone generation Pin
Anders Molin28-Jun-01 9:14
professionalAnders Molin28-Jun-01 9:14 
GeneralMSDATLST.OCX Pin
28-Jun-01 8:05
suss28-Jun-01 8:05 
GeneralCFile open behaviour Pin
28-Jun-01 7:32
suss28-Jun-01 7:32 

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.