|
-
February 28th, 2001, 07:04 PM
#1
AfxGetApp in DLL
I am working on the project which is composed of a main EXE with several DLLs. I am trying to get a pointer to the main app (not dll app) by using
AfxGetApp and casitng it but I keep getting a pointer to my DLL app.
How do I get a pointer to the main app.
Thanks
-
January 16th, 2002, 03:37 AM
#2
Re: AfxGetApp in DLL
Hi,
try this in your dll code:
// switch thread state back to application
_AFX_THREAD_STATE* pState = AfxGetThreadState();
AfxSetModuleState(pState->m_pPrevModuleState);
// do something with the application
AfxGetApp()->...
// switch thread state back to dll
AFX_MANAGE_STATE(AfxGetStaticModuleState())
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|