MFC: LineDraw Release Error

This is a discussion on MFC: LineDraw Release Error within the Windows Programming forums, part of the Platform Specific Boards category; this code compiles fine in Debug mode but when i try to compile it in final mode i get 2 ...

  1. #1
    Registered User mrafcho001's Avatar
    Join Date
    Jan 2005
    Posts
    483

    MFC: LineDraw Release Error

    this code compiles fine in Debug mode but when i try to compile it in final mode i get 2 errors:
    Code:
    Error 1:
    Line Draw error LNK2019: unresolved external symbol __endthreadex referenced in function "void __stdcall AfxEndThread(unsigned int,int)" (?AfxEndThread@@YGXIH@Z)
    
    Error 2:
    Line Draw error LNK2019: unresolved external symbol __beginthreadex referenced in function "public: int __thiscall CWinThread::CreateThread(unsigned long,unsigned int,struct _SECURITY_ATTRIBUTES *)" (?CreateThread@CWinThread@@QAEHKIPAU_SECURITY_ATTRIBUTES@@@Z)

    MY CODE:

    Code:
    #include <afxwin.h>
    
    class CMainWindow: public CFrameWnd
    {
    	CPoint m_StartPoint, m_EndPoint;
    public:
    	CMainWindow()
    	{
    		Create(NULL, "MyWnd");
    	}
    
    	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
    	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
    	DECLARE_MESSAGE_MAP()
    };
    
    BEGIN_MESSAGE_MAP(CMainWindow, CFrameWnd)
    	ON_WM_LBUTTONDOWN()
    	ON_WM_LBUTTONUP()
    END_MESSAGE_MAP()
    
    void CMainWindow::OnLButtonDown(UINT nFlags, CPoint point)
    {
    	CFrameWnd::OnLButtonDown(nFlags, point);
    	m_StartPoint = point;
    }
    
    void CMainWindow::OnLButtonUp(UINT nFlags, CPoint point)
    {
    	CFrameWnd::OnLButtonUp(nFlags, point);
    	m_EndPoint = point;
    	CClientDC dc(this);
    	dc.MoveTo(m_StartPoint);
    	dc.LineTo(m_EndPoint);
    }
    
    class MyApp: public CWinApp
    {
    	CMainWindow* Wnd;
    
    public:
    	virtual BOOL InitInstance()
    	{
    		Wnd = new CMainWindow();
    		m_pMainWnd = Wnd;
    		m_pMainWnd->ShowWindow(1);
    		return TRUE;
    	}
    };
    
    MyApp MyAPP;

  2. #2
    Registered User mrafcho001's Avatar
    Join Date
    Jan 2005
    Posts
    483
    nvm i got it...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Quantum Random Bit Generator
    By shawnt in forum C++ Programming
    Replies: 62
    Last Post: 06-18-2008, 11:17 AM
  2. Using VC Toolkit 2003
    By Noobwaker in forum Windows Programming
    Replies: 8
    Last Post: 03-13-2006, 07:33 AM
  3. Please Help - Problem with Compilers
    By toonlover in forum C++ Programming
    Replies: 5
    Last Post: 07-23-2005, 11:03 AM
  4. ras.h errors
    By Trent_Easton in forum Windows Programming
    Replies: 8
    Last Post: 07-15-2005, 11:52 PM
  5. pointer to array of objects of struct
    By undisputed007 in forum C++ Programming
    Replies: 12
    Last Post: 03-02-2004, 04:49 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21