Dll Linking problem
-
Hi... I have createed a dll. Name is
CMyClass
my main calss is
void CTestDLLDlg::OnOK()
{
CMyClass objMyClass;
UpdateData(true);
CString str = "Some text";
CString strResult = objMyClass.SayHello(str);
//CDialog::OnOK();
}I have the foolowing function in MyClass dll
CMyClass::SayHello(CString strName) { //Return the input string with a Hello prefixed Hwnd dlg; SetDlgItemTextW(dlg,IDC_EDIT1,strName); return "Hello " + strName; }
Dll class window id is IDD_DIALOG1 and class name is CMyClass. Here i have to set strName in IDC_EDIT1. How to do this? Any help will be appriciated... Thanks...G.Paulraj
-
Hi... I have createed a dll. Name is
CMyClass
my main calss is
void CTestDLLDlg::OnOK()
{
CMyClass objMyClass;
UpdateData(true);
CString str = "Some text";
CString strResult = objMyClass.SayHello(str);
//CDialog::OnOK();
}I have the foolowing function in MyClass dll
CMyClass::SayHello(CString strName) { //Return the input string with a Hello prefixed Hwnd dlg; SetDlgItemTextW(dlg,IDC_EDIT1,strName); return "Hello " + strName; }
Dll class window id is IDD_DIALOG1 and class name is CMyClass. Here i have to set strName in IDC_EDIT1. How to do this? Any help will be appriciated... Thanks...G.Paulraj
Paulraj G wrote:
Hwnd dlg; SetDlgItemTextW(dlg,IDC_EDIT1,strName);
Here you are calling SetDlgItemTextW() on an invalid handle. May be you can pass a valid dialog handle to the function SayHello().