Click here to Skip to main content
15,914,401 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Motion Detection Pin
Hamid_RT28-May-07 20:03
Hamid_RT28-May-07 20:03 
AnswerRe: Motion Detection Pin
Amar Sutar28-May-07 21:10
Amar Sutar28-May-07 21:10 
QuestionDeclaring Global Variable Pin
Anurag Gandhi28-May-07 19:21
professionalAnurag Gandhi28-May-07 19:21 
AnswerRe: Declaring Global Variable Pin
autodebug28-May-07 19:33
autodebug28-May-07 19:33 
GeneralRe: Declaring Global Variable Pin
Anurag Gandhi28-May-07 19:39
professionalAnurag Gandhi28-May-07 19:39 
GeneralRe: Declaring Global Variable Pin
jhwurmbach28-May-07 22:41
jhwurmbach28-May-07 22:41 
AnswerRe: Declaring Global Variable Pin
Matthew Faithfull28-May-07 22:55
Matthew Faithfull28-May-07 22:55 
AnswerRe: Declaring Global Variable Pin
Nelek29-May-07 1:23
protectorNelek29-May-07 1:23 
I have done it as follows:

Stdafx.cpp
//...
CMyDoc* m_pDoc = NULL;

And then:
CMyView::OnInitialUpdate ()
{
extern CMyDoc* m_pDoc;
m_pDoc = GetDocument ();
}

Then you can use the reference to the ACTUAL document from everywhere, putting the "extern CMyDoc* m_pDoc" anywhere (CObject derived, Dialogs, CFormViews...).

For me it works, so I think it can be used with other type of variables.

Greetings.

--------
M.D.V.

If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?

QuestionASSERT(m_pCtrlSite == NULL) error on activex addition Pin
shivditya28-May-07 16:44
shivditya28-May-07 16:44 
AnswerRe: ASSERT(m_pCtrlSite == NULL) error on activex addition Pin
Garth J Lancaster29-May-07 1:22
professionalGarth J Lancaster29-May-07 1:22 
AnswerRe: ASSERT(m_pCtrlSite == NULL) error on activex addition Pin
Garth J Lancaster30-May-07 0:58
professionalGarth J Lancaster30-May-07 0:58 
QuestionTitle bar Pin
Aint28-May-07 15:33
Aint28-May-07 15:33 
AnswerRe: Title bar Pin
Naveen28-May-07 15:40
Naveen28-May-07 15:40 
GeneralRe: Title bar Pin
Aint28-May-07 17:07
Aint28-May-07 17:07 
GeneralRe: Title bar Pin
Naveen28-May-07 17:16
Naveen28-May-07 17:16 
QuestionBluetooth and WinSocks problem Pin
(Steven Hicks)n+128-May-07 10:45
(Steven Hicks)n+128-May-07 10:45 
AnswerRe: Bluetooth and WinSocks problem Pin
Mark Salsbery28-May-07 13:28
Mark Salsbery28-May-07 13:28 
GeneralRe: Bluetooth and WinSocks problem Pin
(Steven Hicks)n+128-May-07 13:43
(Steven Hicks)n+128-May-07 13:43 
GeneralRe: Bluetooth and WinSocks problem Pin
Mark Salsbery28-May-07 13:52
Mark Salsbery28-May-07 13:52 
GeneralRe: Bluetooth and WinSocks problem Pin
(Steven Hicks)n+128-May-07 14:48
(Steven Hicks)n+128-May-07 14:48 
GeneralRe: Bluetooth and WinSocks problem Pin
Mark Salsbery28-May-07 14:53
Mark Salsbery28-May-07 14:53 
GeneralRe: Bluetooth and WinSocks problem Pin
(Steven Hicks)n+128-May-07 15:26
(Steven Hicks)n+128-May-07 15:26 
GeneralRe: Bluetooth and WinSocks problem Pin
Mark Salsbery28-May-07 15:54
Mark Salsbery28-May-07 15:54 
QuestionSetWindowsHookEx() hook procedure in DLL Pin
Perspx28-May-07 10:25
Perspx28-May-07 10:25 
AnswerRe: SetWindowsHookEx() hook procedure in DLL Pin
autodebug28-May-07 13:06
autodebug28-May-07 13:06 

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.