Home > database >  How to get another PB in the application shows that the value in a DATAWINDOW
How to get another PB in the application shows that the value in a DATAWINDOW

Time:09-30

Want to write a program that can get the other has been compiled into EXE DATAWINDOW in the PB application shows that the value of the people had a similar development?
Had originally planned to use FINDWINDOW, FINDWINDOWEX to implement, but with many DATAWINDOW title are empty, cannot take to handle.
You have any good idea? thank you

CodePudding user response:

No one give some good advice?

CodePudding user response:

With spy++ locate control id, GetDlgItem function is used to collect the control handle, using the API function to get the value, but the change of the focus of attention should be paid to the data window,

CodePudding user response:

Excuse me, how to get on DW value? What is the API function?

CodePudding user response:

The communication between using dde, programs

CodePudding user response:

Can real call east east again, for I have a look at

CodePudding user response:

You yourself look, I did call other procedures button, have pb do
API function definition
The FUNCTION ulong FindWindow (ulong lpClassName, string lpWindowName) LIBRARY "user32. DLL" ALIAS FOR "FindWindowA
"The Function long FindWindowExA (long hWnd, long hWndChild, string lpszClassName, string lpszWindow) library 'user32'
The Function long SendMessage (long HWND, long wMsg, long wParam, string lParam) Library "user32. DLL" Alias for "SendMessageA
"The Function long SendMessagestring (long HWND, long wMsg, long wParam, string lParam) Library "user32. DLL" Alias for "SendMessageA
"The Function long GetDlgIte (long hDlg, long nIDDlgItem) Library "user32" Alias for "GetDlgItem
"-- -- -- -- -- program calls the sample -- -- -- -- --
Ulong ll_wincopy, lpClassName
Ulong ll_winhandle ll_edit, ll_null
Long ll_hwndbtn
String ls_Classbtn
//window title
String ls_title
Ls_title='outpatient barcode printing'
//window handle
Ll_winhandle=FindWindow (lpClassName ls_title)
String ls_ClassName
Ls_ClassName="Edit"
//find
Ll_edit=FindWindowExA (ll_winhandle ll_NULL, ls_ClassName, ' ')
Ll_edit=GetDlgIte (ll_winhandle, 1026)
//send charge news serial number '200912250410' is a serial number
SendMessagestring (ll_edit, 12, 0, '200912250410')
Ls_Classbtn='Button'
//handle to lookup button
Ll_hwndbtn=FindWindowExA (ll_winhandle ll_NULL, ls_Classbtn, 'automatic printing)
Sle_btn. Text=string (ll_hwndbtn)
//send print bar code message
SendMessagenum (ll_hwndbtn, 0, 245)

  • Related