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
H

hailuolan

@hailuolan
About
Posts
3
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Ask for help ___the errors in my projects to show modless dialog in dll [modified]
    H hailuolan

    Thank you very much for your answers. I'll try it again. if there is any error, could you help me again? May I have your Emaill for contact in the future? my Emaill: hailuolan@yahoo.com.cn :) it's my pleasure to make friend with you.

    C / C++ / MFC help

  • Ask for help ___the errors in my projects to show modless dialog in dll [modified]
    H hailuolan

    First, thank you very much for your help. You said "free the library after creating a modless dialog". Beacuse I do not understand the dll, and for some resons, i have to use it with modless dialog. So, could you help me to edit the codes, and make the program run freely. Finally, thanks. it's my pleasure to make friend with you.

    C / C++ / MFC help

  • Ask for help ___the errors in my projects to show modless dialog in dll [modified]
    H hailuolan

    my function in dll: extern "C" _declspec(dllexport) CDialog * ShowDllDlg(HWND hWnd) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); CDllDlg * m_pDlg =new CDllDlg(); m_pDlg->Create(IDD_DLG_DllDLG, CWnd::FromHandle(hWnd)); m_pDlg->ShowWindow(SW_SHOW); return m_pDlg; } Another function to call dll function in my test project: void CTestDlg::OnBnClickedButtonDlltest() { HWND myhWnd = this->m_hWnd; typedef CDialog * (_stdcall *Connect)(HWND hWnd); HINSTANCE hinstDLL=NULL; hinstDLL = ::LoadLibrary("AntiSubmarine.dll"); if (hinstDLL) { Connect Proc; Proc = (Connect)GetProcAddress(hinstDLL,"ShowDllDlg"); if (Proc!=(Connect)NULL) { m_pdlg = (CDialog *)Proc(myhWnd);//in *.h file defines CDialog * m_pdlg; //if only "Proc(myhWnd)", also the same error; } FreeLibrary(hinstDLL); } else { AfxMessageBox("Not found dll !"); } return; } when run the dll, error comes out.

    modified on Wednesday, August 19, 2009 8:47 AM

    C / C++ / MFC help
  • Login

  • Don't have an account? Register

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