如何在线程函数中给编辑框赋值??
急!!!
急!!!
解决方案 »
- MFC中子线程如何获得主线程的句柄
- 请教一个关于模拟鼠标悬停的问题?
- 请问如何令CListCtrl整行可选?
- 如何用cxImage 实现透明的贴图?
- 我要自动删除N条记录,vc+ado delete 但是经常定位出错:代码如下
- 令人郁闷的一个问题,关于hook和ie的一个问题
- 请问有这样一个字符串,怎么将其放到字符串数组中
- 用OpenGL的程序,怎么强行关闭才没有问题?杀进程后原画面会保留在桌面上,请高手指教!!!
- com组件的应用场景,在软件架构层面需要用到Moniker的概念吗?
- 弱问:控件如何使用
- VC ADO "using namespace ADODB" 错误求助
- 请教如何读写.dat文件
如果能取得主对话框的this指针,那就可以通过SetDlgItemText给编辑框赋值
工作者线程函数内,不能调用GUI相关的函数.
能获取的话就用SetWindowText就可以了
[Qoute]
The SetWindowText function changes the text of the specified window's title bar (if it has one). If the specified window is a control, the text of the control is changed. However, SetWindowText cannot change the text of a control in another application.SyntaxBOOL SetWindowText( HWND hWnd,
LPCTSTR lpString
);
ParametershWnd
[in] Handle to the window or control whose text is to be changed.
lpString
[in] Pointer to a null-terminated string to be used as the new title or control text.
Return ValueIf the function succeeds, the return value is nonzero.If the function fails, the return value is zero. To get extended error information, call GetLastError. [/Qoute]