Click here to Skip to main content
15,901,122 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CallBack Definition. Pin
Chris Losinger12-Jan-05 1:05
professionalChris Losinger12-Jan-05 1:05 
GeneralRe: CallBack Definition. Pin
Antony M Kancidrowski12-Jan-05 2:34
Antony M Kancidrowski12-Jan-05 2:34 
General#pragma question Pin
alex.barylski11-Jan-05 20:30
alex.barylski11-Jan-05 20:30 
GeneralRe: #pragma question Pin
Martin Koorts12-Jan-05 0:18
Martin Koorts12-Jan-05 0:18 
GeneralRe: #pragma question Pin
mirex12-Jan-05 1:45
mirex12-Jan-05 1:45 
GeneralRe: #pragma question Pin
Alan Chambers28-Jan-05 11:14
Alan Chambers28-Jan-05 11:14 
GeneralRe: #pragma question Pin
Rick York12-Jan-05 12:12
mveRick York12-Jan-05 12:12 
QuestionHow to Access data of Doc in a thread Pin
IsaacLitingjun11-Jan-05 19:21
IsaacLitingjun11-Jan-05 19:21 
Hi,everyone:

i access my data of Doc using following code:

<br />
CMainFrame* pMainFrmWnd = (CMainFrame*)AfxGetMainWnd();	<br />
	ASSERT(pMainFrmWnd != NULL);	<br />
<br />
	CWnd* pchildWnd = pMainFrmWnd->GetWindow(GW_CHILD);<br />
	ASSERT(pchildWnd->GetSafeHwnd() != NULL);<br />
	<br />
	CvcydcjView *pMyView = NULL;	<br />
	while(pchildWnd->GetSafeHwnd() != NULL)<br />
	{<br />
		ASSERT(pchildWnd->GetSafeHwnd() != NULL);<br />
		if(pchildWnd->GetRuntimeClass()->m_lpszClassName == "CvcydcjView")<br />
		{<br />
			pMyView = (CvcydcjView*)pchildWnd;<br />
			break;<br />
		}<br />
		pchildWnd = pchildWnd->GetWindow(GW_HWNDNEXT);<br />
	}<br />
	ASSERT(pMyView != NULL);<br />
<br />
	CvcydcjDoc *pMydoc;<br />
	pMydoc=pMyView->GetDocument();<br />
	ASSERT(pMydoc != NULL);<br />
<br />
        pMydoc->MyData="demo";<br />


but when i use it in a thread, it didn't work, it seems stopped at
pMydoc=pMyView->GetDocument();<br />


can you give me some suggestions? Thx!

- - - - - - - - - - - - - - - - - - - - - - - - - -
Many nights we prayed with no proof anyone could hear, we were moving moutains long before we knew we could !
Yet now i'm standing here, although we know there's much to fear, hope seems like summer bird too swiftly flown away ...

There can be miracles! When you believe, though hope is frail, it's hard to kill !
Who knows what miracles, you can achieve! When you believe, somehow you will ...

YOU WILL WHEN YOU BELIEVE

AnswerRe: How to Access data of Doc in a thread Pin
Cedric Moonen11-Jan-05 20:12
Cedric Moonen11-Jan-05 20:12 
GeneralRe: How to Access data of Doc in a thread Pin
IsaacLitingjun11-Jan-05 20:52
IsaacLitingjun11-Jan-05 20:52 
GeneralRe: How to Access data of Doc in a thread Pin
Cedric Moonen11-Jan-05 21:07
Cedric Moonen11-Jan-05 21:07 
GeneralRe: How to Access data of Doc in a thread Pin
IsaacLitingjun11-Jan-05 21:23
IsaacLitingjun11-Jan-05 21:23 
AnswerRe: How to Access data of Doc in a thread Pin
Ryan Binns11-Jan-05 20:14
Ryan Binns11-Jan-05 20:14 
GeneralRe: How to Access data of Doc in a thread Pin
IsaacLitingjun11-Jan-05 21:01
IsaacLitingjun11-Jan-05 21:01 
QuestionCpu usage? Pin
dSolariuM11-Jan-05 19:10
dSolariuM11-Jan-05 19:10 
AnswerRe: Cpu usage? Pin
Jetli Jerry12-Jan-05 0:10
Jetli Jerry12-Jan-05 0:10 
AnswerRe: Cpu usage? Pin
David Crow12-Jan-05 5:43
David Crow12-Jan-05 5:43 
GeneralListBox problem Pin
Ivan Cachicatari11-Jan-05 18:54
Ivan Cachicatari11-Jan-05 18:54 
GeneralRe: ListBox problem Pin
basementman12-Jan-05 4:01
basementman12-Jan-05 4:01 
GeneralRe: ListBox problem Pin
Ivan Cachicatari12-Jan-05 7:27
Ivan Cachicatari12-Jan-05 7:27 
Generalprocess ID to process name Pin
2000ram11-Jan-05 18:22
2000ram11-Jan-05 18:22 
GeneralRe: process ID to process name Pin
Aamir Butt11-Jan-05 19:33
Aamir Butt11-Jan-05 19:33 
GeneralVirtual Destructors Pin
Neelesh K J Jain11-Jan-05 18:07
Neelesh K J Jain11-Jan-05 18:07 
GeneralRe: Virtual Destructors Pin
Cedric Moonen11-Jan-05 19:58
Cedric Moonen11-Jan-05 19:58 
GeneralRe: Virtual Destructors Pin
digwizfox13-Jan-05 7:16
digwizfox13-Jan-05 7:16 

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.