既然 MSDN里面有个However,SetWindowText不行了 SetWindowText 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.BOOL SetWindowText( HWND hWnd, // handle to window or control LPCTSTR lpString // title or text );而这里没有那么就是它了哦 WM_SETTEXT An application sends a WM_SETTEXT message to set the text of a window.
用FINDWINDOW找出那个文本框的句柄。。再用SETWINDOWTEXT OR SENDMESSAGE,都可以。
SetWindowText
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.BOOL SetWindowText(
HWND hWnd, // handle to window or control
LPCTSTR lpString // title or text
);而这里没有那么就是它了哦
WM_SETTEXT
An application sends a WM_SETTEXT message to set the text of a window.