Click here to Skip to main content
15,898,884 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Runtime Error, dbgheap.c Line:612 Pin
Jader8914-Oct-05 7:44
Jader8914-Oct-05 7:44 
QuestionHelp with Multi Functions Pin
WackoWolf13-Oct-05 6:12
WackoWolf13-Oct-05 6:12 
AnswerRe: Help with Multi Functions Pin
Maximilien13-Oct-05 6:35
Maximilien13-Oct-05 6:35 
GeneralRe: Help with Multi Functions Pin
WackoWolf13-Oct-05 7:16
WackoWolf13-Oct-05 7:16 
AnswerRe: Help with Multi Functions Pin
ky_rerun13-Oct-05 8:54
ky_rerun13-Oct-05 8:54 
AnswerRe: Help with Multi Functions Pin
jmkhael13-Oct-05 9:44
jmkhael13-Oct-05 9:44 
QuestionEncrypted shared memory Pin
Chintoo72313-Oct-05 5:18
Chintoo72313-Oct-05 5:18 
QuestionMissing pointer between threads Pin
bispenho13-Oct-05 5:16
sussbispenho13-Oct-05 5:16 
:(hi

I'm using in a MFC project thread by AfxBeginThread. I have a dialog window like a main window. Into this window I create a thread. Into this thread I create another dialog window. Into this dialog window I create a instance of a class and try to make a reference the second window. I don't know how to do it using standard functions so I pass a pointer as a parameter to constructor of this object. Example:

threadFunc(LPVOID pvParam){
.
.
.
CDlg* pDlg = new CDlg();
pDlg->DoModal();
}

now the in the second window:

BOOL CDlg::OnInitDialog(){

//here the address in the pointer "this" is 0x3322c9 like example
m_MyObject = new CMyObject(this);

}

in MyObject:

CMyObject::CMyObject(CWnd* pWnd){

//but here the address in "pWnd" is 0xdc3829 -.-"
m_pWnd = (CWnd*)pWnd;

}

Can someone to explain me what is happening?

Thanks for to spend time reading it =)
.Bispo


^_____^
[www.bispenho.com]
AnswerRe: Missing pointer between threads Pin
David Crow13-Oct-05 5:42
David Crow13-Oct-05 5:42 
GeneralRe: Missing pointer between threads Pin
bispenho13-Oct-05 6:20
sussbispenho13-Oct-05 6:20 
GeneralRe: Missing pointer between threads Pin
David Crow13-Oct-05 7:12
David Crow13-Oct-05 7:12 
GeneralRe: Missing pointer between threads Pin
André RB13-Oct-05 7:31
André RB13-Oct-05 7:31 
GeneralRe: Missing pointer between threads Pin
David Crow13-Oct-05 10:18
David Crow13-Oct-05 10:18 
AnswerRe: Missing pointer between threads Pin
LighthouseJ13-Oct-05 8:19
LighthouseJ13-Oct-05 8:19 
GeneralRe: Missing pointer between threads Pin
André RB13-Oct-05 9:20
André RB13-Oct-05 9:20 
QuestionGlobals and namespace Pin
karmendra_js13-Oct-05 4:14
karmendra_js13-Oct-05 4:14 
AnswerRe: Globals and namespace Pin
Chris Losinger13-Oct-05 5:29
professionalChris Losinger13-Oct-05 5:29 
AnswerRe: Globals and namespace Pin
toxcct13-Oct-05 5:29
toxcct13-Oct-05 5:29 
AnswerRe: Globals and namespace Pin
ddmcr13-Oct-05 5:52
ddmcr13-Oct-05 5:52 
AnswerRe: Globals and namespace Pin
ThatsAlok13-Oct-05 7:35
ThatsAlok13-Oct-05 7:35 
AnswerRe: Globals and namespace Pin
Arman S.13-Oct-05 10:36
Arman S.13-Oct-05 10:36 
QuestionListCtrl Pin
karmendra_js13-Oct-05 4:07
karmendra_js13-Oct-05 4:07 
AnswerRe: ListCtrl Pin
muthuramji13-Oct-05 5:26
muthuramji13-Oct-05 5:26 
GeneralRe: ListCtrl Pin
karmendra_js14-Oct-05 0:00
karmendra_js14-Oct-05 0:00 
GeneralRe: ListCtrl Pin
muthuramji14-Oct-05 6:29
muthuramji14-Oct-05 6:29 

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.