Click here to Skip to main content
15,893,401 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: What is the C++ syntax for c# "typeof(string)"? Pin
Hristo-Bojilov15-Aug-09 7:16
Hristo-Bojilov15-Aug-09 7:16 
GeneralRe: What is the C++ syntax for c# "typeof(string)"? Pin
Member 391164315-Aug-09 8:06
Member 391164315-Aug-09 8:06 
QuestionHow to open network addaptor Status dialog programatically. Pin
birajendu15-Aug-09 3:48
birajendu15-Aug-09 3:48 
AnswerRe: How to open network addaptor Status dialog programatically. Pin
Hamid_RT15-Aug-09 21:22
Hamid_RT15-Aug-09 21:22 
AnswerRe: How to open network addaptor Status dialog programatically. Pin
kilt17-Aug-09 3:29
kilt17-Aug-09 3:29 
QuestionHow to add a new column of the open file dialog which in the detail mode? Pin
Member 600960315-Aug-09 3:32
Member 600960315-Aug-09 3:32 
QuestionI need a drag-drop contrl - vertically inside parent window Pin
includeh1015-Aug-09 3:12
includeh1015-Aug-09 3:12 
QuestionWriting a Screensaver Pin
gamefreak229115-Aug-09 2:49
gamefreak229115-Aug-09 2:49 
AnswerRe: Writing a Screensaver Pin
Code-o-mat15-Aug-09 5:27
Code-o-mat15-Aug-09 5:27 
AnswerRe: Writing a Screensaver Pin
Adam Maras15-Aug-09 6:37
Adam Maras15-Aug-09 6:37 
GeneralRe: Writing a Screensaver Pin
gamefreak229115-Aug-09 8:37
gamefreak229115-Aug-09 8:37 
Questiondecompress gzip file using zlib lib Pin
Toubro14-Aug-09 21:30
Toubro14-Aug-09 21:30 
AnswerRe: decompress gzip file using zlib lib Pin
Garth J Lancaster14-Aug-09 21:54
professionalGarth J Lancaster14-Aug-09 21:54 
AnswerRe: decompress gzip file using zlib lib Pin
kilt17-Aug-09 3:28
kilt17-Aug-09 3:28 
QuestionHello How Can I Use C++ read/write data with PLC Pin
driveinc14-Aug-09 21:23
driveinc14-Aug-09 21:23 
AnswerRe: Hello How Can I Use C++ read/write data with PLC Pin
Garth J Lancaster14-Aug-09 22:02
professionalGarth J Lancaster14-Aug-09 22:02 
QuestionAsk for help ___the errors in my projects to show modless dialog in dll [modified] Pin
hailuolan14-Aug-09 19:33
hailuolan14-Aug-09 19:33 
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

AnswerRe: Ask for help ___the errors in my projects to show non-model dialog in dll Pin
zhu_lin16-Aug-09 22:29
zhu_lin16-Aug-09 22:29 
GeneralRe: Ask for help ___the errors in my projects to show non-model dialog in dll Pin
hailuolan19-Aug-09 2:46
hailuolan19-Aug-09 2:46 
AnswerRe: Ask for help ___the errors in my projects to show modless dialog in dll Pin
zhu_lin20-Aug-09 15:26
zhu_lin20-Aug-09 15:26 
GeneralRe: Ask for help ___the errors in my projects to show modless dialog in dll Pin
hailuolan21-Aug-09 4:21
hailuolan21-Aug-09 4:21 
QuestionExtending combo box. [modified] Pin
emmmatty114-Aug-09 19:30
emmmatty114-Aug-09 19:30 
AnswerRe: Extending combo box. Pin
Code-o-mat14-Aug-09 21:17
Code-o-mat14-Aug-09 21:17 
GeneralRe: Extending combo box. Pin
emmmatty114-Aug-09 22:33
emmmatty114-Aug-09 22:33 
QuestionGCC & bitmap.c__ Pin
tuan111114-Aug-09 18:29
tuan111114-Aug-09 18: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.