随笔 - 89  文章 - 118  trackbacks - 0
<2008年9月>
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011

留言簿(16)

随笔分类(56)

随笔档案(89)

文章分类

推荐博客

搜索

  •  

最新随笔

最新评论

阅读排行榜

You will only need to do four things:

1) At the top of your cpp file (under the #includes) add: #define WM_UPDATEFIELDS WM_APP + 1

2) Go to your Message Map section and add: ON_MESSAGE(WM_UPDATEFIELDS, UpdateDisplay)

3) Add a member function: LRESULT UpdateDisplay(WPARAM wParam, LPARAM lParam)

4) Add the following to the function:
UpdateData((BOOL)wParam);
return 0;

This should now allow you to pass UpdateData TRUE or FALSE from within a thread.

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
reference from: codeproject
http://www.codeproject.com/KB/cpp/avoidupdatedata.aspx
posted on 2010-09-28 13:29 胡满超 阅读(530) 评论(0)  编辑 收藏 引用