Sharing Data between object.
-
what is best way to share data among classes? such as CView s & CDocument s ? what about use static data in stdfx.h? Best Regards. MJM.
-
what is best way to share data among classes? such as CView s & CDocument s ? what about use static data in stdfx.h? Best Regards. MJM.
mostafa_pasha wrote:
what is best way to share data among classes? such as CView s & CDocument s ?
The document 'tells' the view that data needs to be rendered. The view 'asks' the document for the data that is to be rendered.
mostafa_pasha wrote:
what about use static data in stdfx.h?
Why?
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
-
what is best way to share data among classes? such as CView s & CDocument s ? what about use static data in stdfx.h? Best Regards. MJM.
mostafa_pasha wrote:
what is best way to share data among classes? such as CView s & CDocument s ? what about use static data in stdfx.h?
there have inbuilt function for access CView from CDocument and Viceversa.. like GetDocument et
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief and You
-
mostafa_pasha wrote:
what is best way to share data among classes? such as CView s & CDocument s ? what about use static data in stdfx.h?
there have inbuilt function for access CView from CDocument and Viceversa.. like GetDocument et
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief and You
Hi, thanks i know GetDocument every view belong to one document! if i wanna use data from two document & alter view what happen! 7 and how can i do that? i found for that i can use document template & for some data can share between all of my object i can declare in C...App the use throw my project with theApp.Data ! is that right?