Click here to Skip to main content
16,005,236 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: a non understandable debug error! Pin
Felix Cho5-Mar-02 2:40
Felix Cho5-Mar-02 2:40 
GeneralRe: a non understandable debug error! Pin
Gérald Mercet5-Mar-02 4:04
Gérald Mercet5-Mar-02 4:04 
Generalanother debug error! Pin
Gérald Mercet5-Mar-02 4:52
Gérald Mercet5-Mar-02 4:52 
GeneralRe: a non understandable debug error! Pin
Nish Nishant4-Mar-02 23:08
sitebuilderNish Nishant4-Mar-02 23:08 
GeneralClear BREAK queu signal on serial port Pin
dejan.n4-Mar-02 22:57
dejan.n4-Mar-02 22:57 
GeneralRe: Clear BREAK queu signal on serial port Pin
Tim Smith5-Mar-02 2:04
Tim Smith5-Mar-02 2:04 
GeneralRe: Clear BREAK queu signal on serial port Pin
dejan.n5-Mar-02 2:47
dejan.n5-Mar-02 2:47 
GeneralHelp with document pointer Pin
Richard Everingham4-Mar-02 22:56
Richard Everingham4-Mar-02 22:56 
I am developing an MDI app. In this app I have two documents and one view for each document. Doc1 is persistant so there is only one instance of it period and that gets opened on startup by default. Doc2's view needs to be able to access a variable in Doc1. I can get a pointer to Doc1 in Doc2's view like so:

Doc2view.h

public:
CDoc2* GetDocument();
CDoc1* GetDBDocument();

....

#ifndef _DEBUG
inline CDoc2* CDoc2view::GetDocument()
{ return (CDoc2*)m_pDocument; }
#endif

#ifndef _DEBUG
inline CDoc1* CDoc2view::GetDBDocument()
{ return (CDoc1*)m_pDocument; }
#endif

Now in Doc2's view I can access the pointer to Doc1 of cource like:
CString Value;
CDoc1* pDoc = GetDBDocument();
Value = pDoc->StoredValue;

The problem is that does not point to the current instance of Doc1 for some reason. When I try and access the variable in Doc1 it returns nothing. In the above example Value would return nada.

Please help I am a little new to MDI programming so this is confusing me.

Thx,
Richard
GeneralRe: Help with document pointer Pin
Joaquín M López Muñoz4-Mar-02 23:02
Joaquín M López Muñoz4-Mar-02 23:02 
GeneralRe: Help with document pointer Pin
Richard Everingham4-Mar-02 23:12
Richard Everingham4-Mar-02 23:12 
GeneralRe: Help with document pointer Pin
Joaquín M López Muñoz4-Mar-02 23:30
Joaquín M López Muñoz4-Mar-02 23:30 
GeneralRe: Help with document pointer Pin
Richard Everingham4-Mar-02 23:47
Richard Everingham4-Mar-02 23:47 
Generaladvanced formatting static/listctrl columns Pin
peterchen4-Mar-02 22:14
peterchen4-Mar-02 22:14 
GeneralRe: advanced formatting static/listctrl columns Pin
Joaquín M López Muñoz4-Mar-02 22:22
Joaquín M López Muñoz4-Mar-02 22:22 
GeneralRe: advanced formatting static/listctrl columns Pin
peterchen4-Mar-02 23:37
peterchen4-Mar-02 23:37 
GeneralRe: advanced formatting static/listctrl columns Pin
Andy Latham8-Jan-03 23:57
Andy Latham8-Jan-03 23:57 
GeneralMessenger Pin
4-Mar-02 22:14
suss4-Mar-02 22:14 
GeneralRe: Media Player [2nd thread - renamed to Messenger] Pin
Nish Nishant4-Mar-02 22:52
sitebuilderNish Nishant4-Mar-02 22:52 
GeneralMedia Player Pin
4-Mar-02 22:12
suss4-Mar-02 22:12 
GeneralRe: Media Player Pin
Christian Graus4-Mar-02 22:19
protectorChristian Graus4-Mar-02 22:19 
GeneralAgatha Christie Pin
Nish Nishant4-Mar-02 22:50
sitebuilderNish Nishant4-Mar-02 22:50 
GeneralHeavy Metal Thunder Pin
Christian Graus4-Mar-02 22:56
protectorChristian Graus4-Mar-02 22:56 
GeneralRe: Heavy Metal Thunder Pin
Nish Nishant4-Mar-02 22:53
sitebuilderNish Nishant4-Mar-02 22:53 
GeneralXP / 2000 window focus Pin
Davy Mitchell4-Mar-02 21:16
Davy Mitchell4-Mar-02 21:16 
GeneralFile size calculation .. Pin
Neha4-Mar-02 20:47
Neha4-Mar-02 20:47 

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.