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
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Dll Linking problem

Dll Linking problem

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorialquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Paulraj G
    wrote on last edited by
    #1

    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

    K 1 Reply Last reply
    0
    • P Paulraj G

      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

      K Offline
      K Offline
      KingsGambit
      wrote on last edited by
      #2

      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().

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

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