Click here to Skip to main content
15,893,588 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Get Windows TaskBar Height & width Pin
FrecherxDachs17-Mar-14 8:22
FrecherxDachs17-Mar-14 8:22 
QuestionHow to guess "do not display content while moving windows" mode Pin
fahmoun27-Oct-06 2:19
fahmoun27-Oct-06 2:19 
AnswerRe: How to guess "do not display content while moving windows" mode Pin
Gavin Taylor27-Oct-06 4:18
professionalGavin Taylor27-Oct-06 4:18 
GeneralRe: How to guess "do not display content while moving windows" mode Pin
fahmoun27-Oct-06 6:02
fahmoun27-Oct-06 6:02 
QuestionRe: How to guess "do not display content while moving windows" mode Pin
Waldermort27-Oct-06 17:55
Waldermort27-Oct-06 17:55 
AnswerRe: How to guess "do not display content while moving windows" mode Pin
Gavin Taylor28-Oct-06 2:27
professionalGavin Taylor28-Oct-06 2:27 
GeneralRe: How to guess "do not display content while moving windows" mode Pin
Waldermort28-Oct-06 23:02
Waldermort28-Oct-06 23:02 
Questiondll problem,help me:) Pin
rxgmoral27-Oct-06 1:15
rxgmoral27-Oct-06 1:15 
dll problem,help meSmile | :)
i create dll project ,the dll is Use MFC in a Static Library
i hope exe call ListCtrl class from dll

==================DLL====================
<<<<<<<<<<listctrl.h>>>>>>>>>>>>>>>
#pragma once
class AFX_EXT_CLASS ListCtrl :public CListCtrl
{
public:
__declspec(dllexport) ListCtrl();
__declspec(dllexport) ~ListCtrl();
public:
DECLARE_MESSAGE_MAP();
public:
afx_msg void OnNMClick(NMHDR *pNMHDR, LRESULT *pResult);
};

<<<<<<<<<<<listctrl.cpp>>>>>>>>>>>
#include "Stdafx.h"
#include "ListCtrl.h"
ListCtrl::ListCtrl()
{}

ListCtrl::~ListCtrl()
{}

BEGIN_MESSAGE_MAP(ListCtrl,CListCtrl)
ON_NOTIFY_REFLECT(NM_CLICK, &ListCtrl::OnNMClick)
END_MESSAGE_MAP()

void ListCtrl::OnNMClick(NMHDR *pNMHDR, LRESULT *pResult)
{
AfxMessageBox(_T("OK"));
*pResult = 0;
}

=====================EXE============================
i Create Exe,the exe is Use MFC in a Static Library

<<<<<<<<<<<testdlg.h>>>>>>>>>>>>
#pragma comment(lib,"Dll.lib")
#include "ListCtrl.h"
class TestDlg : public CDialog
{
DECLARE_DYNAMIC(TestDlg)
public:
TestDlg(CWnd* pParent = NULL); // standard constructor
virtual ~TestDlg();
enum { IDD = IDD_DIALOG1 };
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
DECLARE_MESSAGE_MAP()
ListCtrl m_ListCtrl;
};

<<<<<<<<<<<<<<<testdlg.cpp>>>>>>>>>>
#include "stdafx.h"
#include "Test.h"
#include "TestDlg.h"

IMPLEMENT_DYNAMIC(TestDlg, CDialog)
TestDlg::TestDlg(CWnd* pParent /*=NULL*/)
: CDialog(TestDlg::IDD, pParent)
{}

TestDlg::~TestDlg()
{}

void TestDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
DDX_Control(pDX, IDC_LIST1, m_ListCtrl);
}

BEGIN_MESSAGE_MAP(TestDlg, CDialog)
ON_BN_CLICKED(IDOK, &TestDlg::OnBnClickedOk)
END_MESSAGE_MAP()

======================
the exe project call ListCtrl from dll project
Mouse click the m_ListCtrl window,error
why????
help me,thank you Smile | :)




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

AnswerRe: dll problem,help me:) Pin
toxcct27-Oct-06 2:21
toxcct27-Oct-06 2:21 
AnswerRe: dll problem,help me:) Pin
benjymous27-Oct-06 4:06
benjymous27-Oct-06 4:06 
AnswerRe: dll problem,help me:) Pin
Hamid_RT27-Oct-06 21:32
Hamid_RT27-Oct-06 21:32 
QuestionDeleting a pointer to CString Pin
RadPC27-Oct-06 0:59
RadPC27-Oct-06 0:59 
AnswerRe: Deleting a pointer to CString Pin
toxcct27-Oct-06 1:01
toxcct27-Oct-06 1:01 
GeneralRe: Deleting a pointer to CString Pin
RadPC27-Oct-06 1:10
RadPC27-Oct-06 1:10 
AnswerRe: Deleting a pointer to CString Pin
Cedric Moonen27-Oct-06 1:21
Cedric Moonen27-Oct-06 1:21 
GeneralRe: Deleting a pointer to CString Pin
RadPC27-Oct-06 1:44
RadPC27-Oct-06 1:44 
GeneralRe: Deleting a pointer to CString Pin
Kevin McFarlane27-Oct-06 6:12
Kevin McFarlane27-Oct-06 6:12 
GeneralRe: Deleting a pointer to CString Pin
toxcct27-Oct-06 2:15
toxcct27-Oct-06 2:15 
GeneralRe: Deleting a pointer to CString Pin
Cedric Moonen27-Oct-06 2:25
Cedric Moonen27-Oct-06 2:25 
GeneralRe: Deleting a pointer to CString Pin
toxcct27-Oct-06 2:29
toxcct27-Oct-06 2:29 
QuestionRe: Deleting a pointer to CString Pin
Zac Howland27-Oct-06 3:37
Zac Howland27-Oct-06 3:37 
AnswerRe: Deleting a pointer to CString Pin
Cedric Moonen27-Oct-06 3:42
Cedric Moonen27-Oct-06 3:42 
GeneralRe: Deleting a pointer to CString Pin
Zac Howland27-Oct-06 3:51
Zac Howland27-Oct-06 3:51 
GeneralRe: Deleting a pointer to CString Pin
Cedric Moonen27-Oct-06 4:04
Cedric Moonen27-Oct-06 4:04 
GeneralRe: Deleting a pointer to CString Pin
Zac Howland27-Oct-06 4:07
Zac Howland27-Oct-06 4:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.