UI Thread ... !
-
I'm getting this message when I build my project -
Linking... MyThread.obj : error LNK2001: unresolved external symbol "public: void __thiscall CMyThread::MyMessageHandler(unsigned int,long)" (?MyMessageHandler@CMyThread@@QAEXIJ@Z) E:\Stuff\Manmohan\Visual C++\IPM\Debug\IPM.exe : fatal error LNK1120: 1 unresolved externals
My code is here :-// stdafx.h
.
.
.
#define WM_MYMESSAGE (WM_USER+1)---------------------------------------------
// MyThread.h
#pragma once// CMyThread
class CMyThread : public CWinThread
{
DECLARE_DYNCREATE(CMyThread)//protected:
public:
CMyThread(); // protected constructor used by dynamic creation
virtual ~CMyThread();public:
afx_msg void MyMessageHandler(WPARAM, LPARAM);
virtual BOOL InitInstance();
virtual int ExitInstance();protected:
DECLARE_MESSAGE_MAP()
};-----------------------------------------
//MyThread.cpp
.
.
.
afx_msg void MyMessageHandler(WPARAM, LPARAM)
{}
BEGIN_MESSAGE_MAP(CMyThread, CWinThread)
ON_THREAD_MESSAGE(WM_MYMESSAGE, MyMessageHandler)
END_MESSAGE_MAP()My project is MFC dialog based.
Future Lies in Present. Manmohan Bishnoi
-
I'm getting this message when I build my project -
Linking... MyThread.obj : error LNK2001: unresolved external symbol "public: void __thiscall CMyThread::MyMessageHandler(unsigned int,long)" (?MyMessageHandler@CMyThread@@QAEXIJ@Z) E:\Stuff\Manmohan\Visual C++\IPM\Debug\IPM.exe : fatal error LNK1120: 1 unresolved externals
My code is here :-// stdafx.h
.
.
.
#define WM_MYMESSAGE (WM_USER+1)---------------------------------------------
// MyThread.h
#pragma once// CMyThread
class CMyThread : public CWinThread
{
DECLARE_DYNCREATE(CMyThread)//protected:
public:
CMyThread(); // protected constructor used by dynamic creation
virtual ~CMyThread();public:
afx_msg void MyMessageHandler(WPARAM, LPARAM);
virtual BOOL InitInstance();
virtual int ExitInstance();protected:
DECLARE_MESSAGE_MAP()
};-----------------------------------------
//MyThread.cpp
.
.
.
afx_msg void MyMessageHandler(WPARAM, LPARAM)
{}
BEGIN_MESSAGE_MAP(CMyThread, CWinThread)
ON_THREAD_MESSAGE(WM_MYMESSAGE, MyMessageHandler)
END_MESSAGE_MAP()My project is MFC dialog based.
Future Lies in Present. Manmohan Bishnoi
-
Your method implementation doesn't have the class name -
afx_msg void CMyThread::MyMessageHandler(WPARAM, LPARAM)
{
}L u n a t i c F r i n g e
Bull's Eye :thumbsup:
LunaticFringe wrote:
afx_msg void **CMyThread::**MyMessageHandler(WPARAM, LPARAM) { }
I think I need to get my basics CLEARED AGAIN :^)
Future Lies in Present. Manmohan Bishnoi
-
Bull's Eye :thumbsup:
LunaticFringe wrote:
afx_msg void **CMyThread::**MyMessageHandler(WPARAM, LPARAM) { }
I think I need to get my basics CLEARED AGAIN :^)
Future Lies in Present. Manmohan Bishnoi
-
I'm getting this message when I build my project -
Linking... MyThread.obj : error LNK2001: unresolved external symbol "public: void __thiscall CMyThread::MyMessageHandler(unsigned int,long)" (?MyMessageHandler@CMyThread@@QAEXIJ@Z) E:\Stuff\Manmohan\Visual C++\IPM\Debug\IPM.exe : fatal error LNK1120: 1 unresolved externals
My code is here :-// stdafx.h
.
.
.
#define WM_MYMESSAGE (WM_USER+1)---------------------------------------------
// MyThread.h
#pragma once// CMyThread
class CMyThread : public CWinThread
{
DECLARE_DYNCREATE(CMyThread)//protected:
public:
CMyThread(); // protected constructor used by dynamic creation
virtual ~CMyThread();public:
afx_msg void MyMessageHandler(WPARAM, LPARAM);
virtual BOOL InitInstance();
virtual int ExitInstance();protected:
DECLARE_MESSAGE_MAP()
};-----------------------------------------
//MyThread.cpp
.
.
.
afx_msg void MyMessageHandler(WPARAM, LPARAM)
{}
BEGIN_MESSAGE_MAP(CMyThread, CWinThread)
ON_THREAD_MESSAGE(WM_MYMESSAGE, MyMessageHandler)
END_MESSAGE_MAP()My project is MFC dialog based.
Future Lies in Present. Manmohan Bishnoi
-
I'm getting this message when I build my project -
Linking... MyThread.obj : error LNK2001: unresolved external symbol "public: void __thiscall CMyThread::MyMessageHandler(unsigned int,long)" (?MyMessageHandler@CMyThread@@QAEXIJ@Z) E:\Stuff\Manmohan\Visual C++\IPM\Debug\IPM.exe : fatal error LNK1120: 1 unresolved externals
My code is here :-// stdafx.h
.
.
.
#define WM_MYMESSAGE (WM_USER+1)---------------------------------------------
// MyThread.h
#pragma once// CMyThread
class CMyThread : public CWinThread
{
DECLARE_DYNCREATE(CMyThread)//protected:
public:
CMyThread(); // protected constructor used by dynamic creation
virtual ~CMyThread();public:
afx_msg void MyMessageHandler(WPARAM, LPARAM);
virtual BOOL InitInstance();
virtual int ExitInstance();protected:
DECLARE_MESSAGE_MAP()
};-----------------------------------------
//MyThread.cpp
.
.
.
afx_msg void MyMessageHandler(WPARAM, LPARAM)
{}
BEGIN_MESSAGE_MAP(CMyThread, CWinThread)
ON_THREAD_MESSAGE(WM_MYMESSAGE, MyMessageHandler)
END_MESSAGE_MAP()My project is MFC dialog based.
Future Lies in Present. Manmohan Bishnoi