我一个自己做的DLL已经建立,但总是调用不成功,我觉得调用程序没错误,可能是DLL有问题,此DLL用规则的DLL创建.
程序如下,(请高手帮忙)goloal添加的代码
void ShowDlg()
{
CMyDlg *pDlg=new CMyDlg();
pDlg->Create();
pDlg->ShowWindow();
}下面是类中的函数:
BOOL CMyDlg::ShowWindow()
{
return CWnd::ShowWindow( SW_SHOW);
}
BOOL CMyDlg::Create()
{
return CDialog::Create(IDD_DIALOG1);
}
CMyDlg::CMyDlg(CWnd* pParent /*=NULL*/)
: CDialog(CMyDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CMyDlg)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
清高手帮忙指点。急切!
程序如下,(请高手帮忙)goloal添加的代码
void ShowDlg()
{
CMyDlg *pDlg=new CMyDlg();
pDlg->Create();
pDlg->ShowWindow();
}下面是类中的函数:
BOOL CMyDlg::ShowWindow()
{
return CWnd::ShowWindow( SW_SHOW);
}
BOOL CMyDlg::Create()
{
return CDialog::Create(IDD_DIALOG1);
}
CMyDlg::CMyDlg(CWnd* pParent /*=NULL*/)
: CDialog(CMyDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CMyDlg)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
清高手帮忙指点。急切!
CDialog::Create(IDD_DIALOG1);变成
BOOL CDialog::Create(IDD_DIALOG1, CWnd* pParentWnd = NULL );
然后就会出现错误如下:
--------------------Configuration: MYFIRSTDLL - Win32 Debug--------------------
Compiling...
MyDlg.cpp
MyDlg.cpp(71) : error C2065: 'pParentWnd' : undeclared identifier
\MyDlg.cpp(71) : error C2275: 'CMyDlg::CDialog::CWnd' : illegal use of this type as an expression
Error executing cl.exe.MYFIRSTDLL.dll - 2 error(s), 0 warning(s)请求大侠们给小弟一个答复,谢谢了,
急切!!!!