A、B是运行中的程序,
如何在B程序中获取A程序中的某些内容(如StringGrid中)
A程序中没有任何接口
AB均为Delphi所编
------------------
StringGrid 的句柄我取得了,现在该如何取得 StringGrid 中的所有内容
如何在B程序中获取A程序中的某些内容(如StringGrid中)
A程序中没有任何接口
AB均为Delphi所编
------------------
StringGrid 的句柄我取得了,现在该如何取得 StringGrid 中的所有内容
解决方案 »
- 函数定义
- 在这里问一个非程序的问题.不过也很困难...希望DELPHI的朋友们能帮我解答一下...
- 如何使窗体不出现在下边的任务栏上?
- 我想实现我的EXE程序同时只能运行一个,当该程序已经运行,再运行该程序时能给出提示不能运行两个进程,请问高手怎么实现,解决立即给分
- 一个简单的关于窗体的问题!
- 关于导入EXCEL表的问题,释放出现了问题
- 请问DEPHI中断点续传用什么控件来实现呢?
- 谁有有关DUnit的文档或下载地址
- 我怎么觉得DEPHI的调试功能很差呀?
- 在DELPHI中使标题栏.工具栏,客户区都画上同一种背景?????
- 花大哥,我昨天看了你给我的提示,我还是不明白,能否有这样的例子(关于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)) ;