A、B是运行中的程序,
如何在B程序中获取A程序中的某些内容(如StringGrid中)
A程序中没有任何接口
AB均为Delphi所编
------------------
StringGrid 的句柄我取得了,现在该如何取得 StringGrid 中的所有内容
如何在B程序中获取A程序中的某些内容(如StringGrid中)
A程序中没有任何接口
AB均为Delphi所编
------------------
StringGrid 的句柄我取得了,现在该如何取得 StringGrid 中的所有内容
解决方案 »
- clientdatset ApplyUpdates(0) 无法定位行,一些数据可能在读取后更改
- 请教通讯 多线程访问 全局变量 Tlist的问题
- 请何判断用户切换了程序?
- Access数据库怎样重命名表?
- ehlib 的 DBGridEh 最后一行汇总栏更新数据时不能即时刷新,不知在哪设
- 在线请教-如何将String类型转换成PWideChar???
- 为什么这几行代码不对。
- 利用微软的Html Help Workshop做帮助文件时遇到了一个困难,请大家帮助。
- 报表问题
- 关于如何使的ActiveXForm控件能够在网页里接收参数的问题
- 花大哥,我昨天看了你给我的提示,我还是不明白,能否有这样的例子(关于DataetAdapter,能任意在网页中放置数据的。),让我看看。c841@1
- sql查询问题
wParam = (WPARAM) cchTextMax; // number of characters to copy
lParam = (LPARAM) lpszText; // address of buffer for text
ParameterscchTextMaxValue of wParam. Specifies the maximum number of characters to be copied, including the terminating null character. lpszTextValue of lParam. Points to the buffer that is to receive the text. Return ValuesThe return value is the number of characters copied. Default ActionThe DefWindowProc function copies the text associated with the window into the specified buffer and returns the number of characters copied. ResFor an edit control, the text to be copied is the content of the edit control. For a combo box, the text is the content of the edit control (or static-text) portion of the combo box. For a button, the text is the button name. For other windows, the text is the window title. To copy the text of an item in a list box, an application can use the LB_GETTEXT message.
When the WM_GETTEXT message is sent to a static control with the SS_ICON style, the handle of the icon will be returned in the first four bytes of the buffer pointed to by lpszText. This is true only if the WM_SETTEXT message has been used to set the icon. In a rich edit control, if the text to be copied exceeds 64K, use either the message EM_STREAMOUT or EM_GETSELTEXT.
H1,H2,H3:THandle ;
begin
H1:=FindWindow(nil,'B程序的caption); //StringGrid所在窗体的caption
H2 := Findwindowex(H1,0,'TEdit',nil); //得到class为TEdit的第一个控件的句柄.
//H2 := Findwindowex(H1,0,'TEdit','Edit1'); //如果知道name为Edit1,就可以这样写.
Sendmessage(h2,WM_GETTEXT,255,p) ; //p为你想要的文本,size为文本长度
showmessage(string(p)) ;