Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Help with switching to module state (DLL)

Help with switching to module state (DLL)

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    KnaveR777
    wrote on last edited by
    #1

    I have been working on a DLL w/ a basic CDialog. At this point, my dialog can be loaded with my testerApp and appears to work (can drag arround click buttons etc), but there appears to be something odd going on when switching to the module state. When the my dll's CWinApp::InitInstance() is called, this is 0x101c8640. In calls to the dll's exported funcs this is 0x0012fdac (the same as my tester app). Any ideas on what I am doing wrong? BOOL CWM_Script_DLLApp::InitInstance() { CWinApp::InitInstance(); dlg = NULL; return TRUE; } extern "C" void CWM_Script_DLLApp::createDialog(void) { AFX_MANAGE_STATE(AfxGetStaticModuleState( )) if(dlg == NULL){ dlg = new CTestDlg(CWnd::GetDesktopWindow(),this); //pass this so dlg can be set to null on close dlg->Create(CTestDlg::IDD); dlg->ShowWindow(SW_SHOW); } else{ dlg->SetActiveWindow(); } } void CWM_Script_DLLApp::killTestDlg(void) { dlg = NULL; }

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups