Click here to Skip to main content
15,895,557 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CTabCtrl set inactive tabitem? Pin
Hamid_RT19-Oct-06 7:35
Hamid_RT19-Oct-06 7:35 
Questionlog on as this account with SERVICE_INTERACTIVE_PROCESS Pin
noeleon16-Oct-06 21:25
noeleon16-Oct-06 21:25 
Questionservice systray icons Pin
noeleon16-Oct-06 21:22
noeleon16-Oct-06 21:22 
AnswerRe: service systray icons Pin
Mark Salsbery17-Oct-06 7:12
Mark Salsbery17-Oct-06 7:12 
AnswerRe: service systray icons Pin
ThatsAlok18-Oct-06 2:19
ThatsAlok18-Oct-06 2:19 
Questionmodifying the system image list fails in Vista Pin
indra2016-Oct-06 21:17
indra2016-Oct-06 21:17 
QuestionRe: modifying the system image list fails in Vista Pin
David Crow17-Oct-06 3:13
David Crow17-Oct-06 3:13 
QuestionLink error question Pin
GDavy16-Oct-06 20:53
GDavy16-Oct-06 20:53 
I got a linking problem. I think it has something to do with MFC and such but I`m not sure.. The problem is as follows:
I made a .dll file and in it is a class derived from CDialog, something like:

#ifdef __DLL_BUILD__<br />
#define LD_DECSPEC __declspec(dllexport)<br />
#else<br />
#define LD_DECSPEC __declspec(dllimport)<br />
#endif<br />
<br />
class LD_DECSPEC CDllDialog : public CDialog<br />
{<br />
public:<br />
	CDllDialog( CWnd* pParent = NULL ); <br />
	CDllDialog( UINT nIDD, CWnd* pParent = NULL ); <br />
	virtual ~CDllDialog();<br />
<br />
// Dialog Data<br />
	//{{AFX_DATA(CDllDialog )<br />
		// NOTE: the ClassWizard will add data members here<br />
	//}}AFX_DATA<br />
<br />
	enum{ ID_DLG_LOGOUT = 200 };<br />
<br />
// Overrides<br />
	// ClassWizard generated virtual function overrides<br />
	//{{AFX_VIRTUAL(CDllDialog)<br />
public:<br />
	virtual BOOL PreTranslateMessage( MSG* pMsg );<br />
protected:<br />
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support<br />
	//}}AFX_VIRTUAL<br />
<br />
// Implementation<br />
protected:<br />
<br />
	// Generated message map functions<br />
	//{{AFX_MSG(CDllDialog )<br />
	virtual BOOL OnInitDialog();<br />
	//}}AFX_MSG<br />
	DECLARE_MESSAGE_MAP()<br />
};<br />



In another project I want to derive another dialog from that dialog like:

class CDLG_AppSelect : public CDllDialog <br />
{<br />
public:<br />
	CDLG_AppSelect(CWnd* pParent = NULL);<br />
	// Dialog Data<br />
	//{{AFX_DATA(CDLG_AppSelect)<br />
	enum { IDD = IDD_LOGINAPP_DIALOG };<br />
		// NOTE: the ClassWizard will add data members here<br />
	//}}AFX_DATA<br />
<br />
	// ClassWizard generated virtual function overrides<br />
	//{{AFX_VIRTUAL(CDLG_AppSelect)<br />
	protected:<br />
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support<br />
	//}}AFX_VIRTUAL<br />
<br />
	<br />
// Implementation<br />
protected:<br />
	CLD_Button m_btnCancel;<br />
	CLD_Static m_statDlgTitle;<br />
	void CreateControls();<br />
<br />
	// Generated message map functions<br />
	//{{AFX_MSG(CDLG_AppSelect)<br />
	virtual BOOL OnInitDialog();<br />
 	afx_msg virtual int  OnPressCancel();<br />
 	afx_msg virtual int  OnStartApplication();<br />
	//}}AFX_MSG<br />
	DECLARE_MESSAGE_MAP()<br />
};<br />



The error I got is:

DLG_AppSelect.obj : error LNK2019: unresolved external symbol "protected: static struct AFX_MSGMAP const CDllDialog::messageMap" (?messageMap@CDllDialog@@1UAFX_MSGMAP@@B) referenced in function "protected: static struct AFX_MSGMAP const * __cdecl C
DLG_AppSelect::_GetBaseMessageMap(void)" (?_GetBaseMessageMap@CDLG_AppSelect@@KAPBUAFX_MSGMAP@@XZ)


So it looks it has something to do with the DECLARE_MESSAGE_MAP macro or something... Does anyone know how to solve this problem?
Thanks for any info you can provide

Davy
AnswerRe: Link error question Pin
prasad_som16-Oct-06 21:16
prasad_som16-Oct-06 21:16 
GeneralRe: Link error question Pin
GDavy16-Oct-06 21:20
GDavy16-Oct-06 21:20 
QuestionRe: Link error question Pin
prasad_som16-Oct-06 21:27
prasad_som16-Oct-06 21:27 
AnswerRe: Which certification suites for VC++ MFC programmer Pin
David Crow17-Oct-06 3:18
David Crow17-Oct-06 3:18 
QuestionImporting outlook contacts Pin
Mithin16-Oct-06 20:43
Mithin16-Oct-06 20:43 
AnswerRe: Importing outlook contacts Pin
Umesh KV Guptha16-Oct-06 20:57
Umesh KV Guptha16-Oct-06 20:57 
GeneralRe: Importing outlook contacts Pin
Mithin16-Oct-06 21:13
Mithin16-Oct-06 21:13 
GeneralRe: Importing outlook contacts Pin
ThatsAlok16-Oct-06 23:40
ThatsAlok16-Oct-06 23:40 
AnswerRe: Importing outlook contacts Pin
David Crow17-Oct-06 4:26
David Crow17-Oct-06 4:26 
Questionenable logging capability Pin
mt_samiei16-Oct-06 20:35
mt_samiei16-Oct-06 20:35 
AnswerRe: enable logging capability Pin
Parthi_Appu16-Oct-06 20:47
Parthi_Appu16-Oct-06 20:47 
GeneralRe: enable logging capability Pin
Steve S16-Oct-06 21:38
Steve S16-Oct-06 21:38 
GeneralRe: enable logging capability Pin
Parthi_Appu16-Oct-06 22:39
Parthi_Appu16-Oct-06 22:39 
QuestionProviding Auto Scroll Feature to CListCtrl Pin
vijay_aroli16-Oct-06 19:51
vijay_aroli16-Oct-06 19:51 
AnswerRe: Providing Auto Scroll Feature to CListCtrl Pin
Owner drawn16-Oct-06 20:02
Owner drawn16-Oct-06 20:02 
GeneralRe: Providing Auto Scroll Feature to CListCtrl Pin
vijay_aroli16-Oct-06 20:19
vijay_aroli16-Oct-06 20:19 
QuestionCustom title bar Pin
Waldermort16-Oct-06 18:58
Waldermort16-Oct-06 18:58 

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.