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******************************
<<<<<List.h>>>>>>>>
#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);
};
<<<<<<List.Cpp>>>>>>>>>
#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:)
--
rxgmoral
------------------------------------------------------------------------
Posted via
http://www.codecomments.com
------------------------------------------------------------------------