turtleC++'s Profile User Rating: -----

Reputation: 3 Apprentice
Group:
Active Members
Active Posts:
132 (0.05 per day)
Joined:
07-May 08
Profile Views:
3,338
Last Active:
User is offline Aug 27 2015 06:40 PM
Currently:
Offline

Previous Fields

Dream Kudos:
0

Latest Visitors

Icon   turtleC++ has not set their status

Posts I've Made

  1. In Topic: MFC multithread accessing to another dialog box control ?

    Posted 27 Aug 2015

    It still has the same crash.
  2. In Topic: MFC multithread accessing to another dialog box control ?

    Posted 26 Aug 2015

    Below is the class declaration. Thanks

    class CListCtrlExerciseDlg : public CDialog
    {
    // Construction
    public:
    	CListCtrlExerciseDlg(CWnd* pParent = NULL);	// standard constructor
    
    	static UINT DoWork(LPVOID param);
    
    	//structure for passing to the controlling function
    	typedef struct ListCtrlExerciseThreadStruct
    	{
    		CListCtrlExerciseDlg* m_this;
    	}ListCtrlExerciseThreadStruct;
    
    // Dialog Data
    	enum { IDD = IDD_LISTCTRLEXERCISESAMPLE_DIALOG };
    
    	protected:
    	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
    
    
    // Implementation
    protected:
    	HICON m_hIcon;
    
    	// Generated message map functions
    	virtual BOOL OnInitDialog();
    	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
    	afx_msg void OnPaint();
    	afx_msg HCURSOR OnQueryDragIcon();
    	DECLARE_MESSAGE_MAP()
    public:
    	afx_msg void OnBnClickedBtntest();
    	
    	CTestDlg m_TestDlg;
    	ListCtrlExerciseThreadStruct* m_listCtrlExerciseThread;
    };
    
  3. In Topic: MFC multithread accessing to another dialog box control ?

    Posted 25 Aug 2015

    View Post#define, on 25 August 2015 - 01:36 PM, said:

    Hi, will passing a method work? Will it not need to be an ordinary function?

    sorry I understand your questions.
  4. In Topic: MFC multithread accessing to another dialog box control ?

    Posted 25 Aug 2015

    I wonder is it possible that the worker thread starts first then call PostMessage() way before the dialog box becomes visible? I'm going to try to add some dummy task in worker thread to delay the call to PostMessage().
  5. In Topic: MFC multithread accessing to another dialog box control ?

    Posted 24 Aug 2015

    Thank you for your response. I declare m_listCtrlExerciseThread inside the class CListCtrlExerciseDlg. Then I instantiate m_listCtrlExerciseThread and initialize it to "this" inside CListCtrlExerciseDlg::OnInitDialog() function.

    As for the debugging value of m_TestDlg, It has 0x00000000.

My Information

Member Title:
D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:

Contact Information

E-mail:
Private

Friends

turtleC++ hasn't added any friends yet.

Comments

turtleC++ has no profile comments yet. Why not say hello?