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. about dll problem,thank:)

about dll problem,thank:)

Scheduled Pinned Locked Moved C / C++ / MFC
comhelpquestion
3 Posts 3 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.
  • R Offline
    R Offline
    rxgmoral
    wrote on last edited by
    #1

    about dll problem,thank:) i have two file a static dll file ,another static Exe file i think Exe call List Class in dll,but.......... ************************static dll****************************** <<<<>>>>>>> #pragma once class AFX_EXT_CLASS List:public CListCtrl { public: __declspec(dllexport) List(); __declspec(dllexport) ~List(); __declspec(dllexport) void CMCreate(CWnd *pWnd); DECLARE_MESSAGE_MAP(); public: __declspec(dllexport) afx_msg void OnNMClick(NMHDR *pNMHDR, LRESULT *pResult); }; <<<<<>>>>>>>> #include "Stdafx.h" #include "List.h" List::List() {} List::~List() {} BEGIN_MESSAGE_MAP(List,CListCtrl) ON_NOTIFY_REFLECT(NM_CLICK, &List::OnNMClick) END_MESSAGE_MAP() void List::OnNMClick(NMHDR *pNMHDR, LRESULT *pResult) { AfxMessageBox(_T("OK")); *pResult = 0; } void List::CMCreate(CWnd *pWnd) { this->Create(WS_VISIBLE | WS_BORDER|SS_NOTIFY | WS_TABSTOP | WS_CHILD | LVS_ALIGNTOP | LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_OWNERDRAWFIXED, CRect(20, 20, 800, 200), pWnd, 123); } *************************Exe************************ List *m_pList; m_pList=new List(); m_pList->CMCreate(this); why ,i Click m_pList not show "ok"??? my english is not good,sorry :( thank you:)

    Blog: http://360.yahoo.com/rxgmoral

    H T 2 Replies Last reply
    0
    • R rxgmoral

      about dll problem,thank:) i have two file a static dll file ,another static Exe file i think Exe call List Class in dll,but.......... ************************static dll****************************** <<<<>>>>>>> #pragma once class AFX_EXT_CLASS List:public CListCtrl { public: __declspec(dllexport) List(); __declspec(dllexport) ~List(); __declspec(dllexport) void CMCreate(CWnd *pWnd); DECLARE_MESSAGE_MAP(); public: __declspec(dllexport) afx_msg void OnNMClick(NMHDR *pNMHDR, LRESULT *pResult); }; <<<<<>>>>>>>> #include "Stdafx.h" #include "List.h" List::List() {} List::~List() {} BEGIN_MESSAGE_MAP(List,CListCtrl) ON_NOTIFY_REFLECT(NM_CLICK, &List::OnNMClick) END_MESSAGE_MAP() void List::OnNMClick(NMHDR *pNMHDR, LRESULT *pResult) { AfxMessageBox(_T("OK")); *pResult = 0; } void List::CMCreate(CWnd *pWnd) { this->Create(WS_VISIBLE | WS_BORDER|SS_NOTIFY | WS_TABSTOP | WS_CHILD | LVS_ALIGNTOP | LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_OWNERDRAWFIXED, CRect(20, 20, 800, 200), pWnd, 123); } *************************Exe************************ List *m_pList; m_pList=new List(); m_pList->CMCreate(this); why ,i Click m_pList not show "ok"??? my english is not good,sorry :( thank you:)

      Blog: http://360.yahoo.com/rxgmoral

      H Offline
      H Offline
      Hamid Taebi
      wrote on last edited by
      #2

      What happens when you click ok


      WhiteSky


      1 Reply Last reply
      0
      • R rxgmoral

        about dll problem,thank:) i have two file a static dll file ,another static Exe file i think Exe call List Class in dll,but.......... ************************static dll****************************** <<<<>>>>>>> #pragma once class AFX_EXT_CLASS List:public CListCtrl { public: __declspec(dllexport) List(); __declspec(dllexport) ~List(); __declspec(dllexport) void CMCreate(CWnd *pWnd); DECLARE_MESSAGE_MAP(); public: __declspec(dllexport) afx_msg void OnNMClick(NMHDR *pNMHDR, LRESULT *pResult); }; <<<<<>>>>>>>> #include "Stdafx.h" #include "List.h" List::List() {} List::~List() {} BEGIN_MESSAGE_MAP(List,CListCtrl) ON_NOTIFY_REFLECT(NM_CLICK, &List::OnNMClick) END_MESSAGE_MAP() void List::OnNMClick(NMHDR *pNMHDR, LRESULT *pResult) { AfxMessageBox(_T("OK")); *pResult = 0; } void List::CMCreate(CWnd *pWnd) { this->Create(WS_VISIBLE | WS_BORDER|SS_NOTIFY | WS_TABSTOP | WS_CHILD | LVS_ALIGNTOP | LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_OWNERDRAWFIXED, CRect(20, 20, 800, 200), pWnd, 123); } *************************Exe************************ List *m_pList; m_pList=new List(); m_pList->CMCreate(this); why ,i Click m_pList not show "ok"??? my english is not good,sorry :( thank you:)

        Blog: http://360.yahoo.com/rxgmoral

        T Offline
        T Offline
        ThatsAlok
        wrote on last edited by
        #3

        rxgmoral wrote:

        void List::CMCreate(CWnd *pWnd) { this->Create(WS_VISIBLE | WS_BORDER|SS_NOTIFY | WS_TABSTOP | WS_CHILD | LVS_ALIGNTOP | LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_OWNERDRAWFIXED, CRect(20, 20, 800, 200), pWnd, 123); }

        try to make BreakPoint here! and debug through it

        "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

        cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief And You

        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