我创建了一个资源dialog CDialog 在CRDialog.h 增加
class CDialogThread : public CWinThread
{
DECLARE_DYNCREATE(CDialogThread)
CDialogThread() {};
virtual BOOL InitInstance();
};
CRDialog.cpp
IMPLEMENT_DYNCREATE(CDialogThread, CWinThread)
BOOL CDialogThread::InitInstance()
{
CRDialog *dlldlg=new CRDialog;
dlldlg->Create(IDD_RDIALOG,NULL);
dlldlg->ShowWindow(SW_SHOWNORMAL);
return FALSE;
}
因为源文件是dll 在
extern "C" __declspec(dllexport) void ShowDlg(char *mch)
{
AfxBeginThread ( RUNTIME_CLASS(CDialogThread) );
}
但是这样 可以创建对话框 我想把char *mch作为该对话框的caption而这个不知道怎么实现,谢谢。请各位帮我看看,在线求解。
class CDialogThread : public CWinThread
{
DECLARE_DYNCREATE(CDialogThread)
CDialogThread() {};
virtual BOOL InitInstance();
};
CRDialog.cpp
IMPLEMENT_DYNCREATE(CDialogThread, CWinThread)
BOOL CDialogThread::InitInstance()
{
CRDialog *dlldlg=new CRDialog;
dlldlg->Create(IDD_RDIALOG,NULL);
dlldlg->ShowWindow(SW_SHOWNORMAL);
return FALSE;
}
因为源文件是dll 在
extern "C" __declspec(dllexport) void ShowDlg(char *mch)
{
AfxBeginThread ( RUNTIME_CLASS(CDialogThread) );
}
但是这样 可以创建对话框 我想把char *mch作为该对话框的caption而这个不知道怎么实现,谢谢。请各位帮我看看,在线求解。
The SetWindowText function changes the text of the specified window's title bar (if it has one). If the specified window is a control, the text of the control is changed. However, SetWindowText cannot change the text of a control in another application.BOOL SetWindowText(
HWND hWnd, // handle to window or control
LPCTSTR lpString // address of string
);