Click here to Skip to main content
15,915,508 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to check thread.? Pin
benjymous27-Oct-06 5:06
benjymous27-Oct-06 5:06 
GeneralRe: How to check thread.? Pin
led mike27-Oct-06 5:11
led mike27-Oct-06 5:11 
GeneralRe: How to check thread.? Pin
ThatsAlok28-Oct-06 2:01
ThatsAlok28-Oct-06 2:01 
Questionproblem using WideCharToMultiByte() Pin
priyank_ldce27-Oct-06 3:54
priyank_ldce27-Oct-06 3:54 
AnswerRe: problem using WideCharToMultiByte() Pin
Nemanja Trifunovic27-Oct-06 4:11
Nemanja Trifunovic27-Oct-06 4:11 
QuestionDirectX license Pin
Daniel Kanev7-Mar-17 10:45
Daniel Kanev7-Mar-17 10:45 
AnswerRe: DirectX license Pin
Zac Howland27-Oct-06 3:33
Zac Howland27-Oct-06 3:33 
AnswerRe: DirectX license Pin
Mark Salsbery27-Oct-06 5:36
Mark Salsbery27-Oct-06 5:36 
Questionbutton kept pushed Pin
Desmo1627-Oct-06 3:02
Desmo1627-Oct-06 3:02 
AnswerRe: button kept pushed Pin
Chris Losinger27-Oct-06 4:09
professionalChris Losinger27-Oct-06 4:09 
AnswerRe: button kept pushed Pin
Roger Stoltz27-Oct-06 5:44
Roger Stoltz27-Oct-06 5:44 
AnswerRe: button kept pushed Pin
ThatsAlok28-Oct-06 1:57
ThatsAlok28-Oct-06 1:57 
QuestionGet Windows TaskBar Height & width Pin
QuickDeveloper27-Oct-06 2:43
QuickDeveloper27-Oct-06 2:43 
AnswerRe: Get Windows TaskBar Height & width Pin
Daniel Kanev27-Oct-06 3:27
Daniel Kanev27-Oct-06 3:27 
AnswerRe: Get Windows TaskBar Height & width Pin
David Crow27-Oct-06 3:29
David Crow27-Oct-06 3:29 
AnswerRe: Get Windows TaskBar Height & width Pin
Michael Dunn27-Oct-06 16:24
sitebuilderMichael Dunn27-Oct-06 16:24 
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 

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.