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