I used to a PDDW sendmessage (class name: pbdw90) similar to the window of the edit box to send messages fails, what should I do?
I was written in easy language to a pb application message
CodePudding user response:
The
refer to the original poster yxd_6363 response: I use sendmessage to a PDDW (class name: pbdw90) similar to the window of the edit box to send messages fails, what should I do? I was written in easy language to a pb application message What are you going to send information? CodePudding user response:
The example below Here, of course, refers to a program that reads data window in another program, there are many methods of the vision, the simple method is to the data window message! Consider this: How to file Datawindow without using Datawindow functions provides. //I test only on the original concept 6.5 build 444 Long ll_dw_handle Ll_dw_handle=handle (dw_1) The Function Power Script Retrieve Post (ll_dw_handle, 1306, 0, 0) Post (ll_dw_handle, 1320, 0, 0) ScrollNextPage Post (ll_dw_handle, 1318, 0, 0) ScrollPriorPage Post (ll_dw_handle, 1319, 0, 0) ScrollToFirstPage Post (ll_dw_handle, 1315, 0, 1)//1=first row? ScrollToLastPage Post (ll_dw_handle, 1315, 0, 99999999)/99999999=last page? Pb6 programmer don 't know how to get the last page:) The Sort Dialog Post (ll_dw_handle, 1309, 0, 0) The Filter Dialog Post (ll_dw_handle, 1311, 0, 0) DeleteRow Post (ll_dw_handle, 1357, 0, 0) Post (ll_dw_handle, 1307, 0, 0) Append a Row Post (ll_dw_handle, 1357, 0, 0) Post (ll_dw_handle, 1312, 0, 0) Post (ll_dw_handle, 1315, 0, dw_1 rowcount () + 1) Post (ll_dw_handle, 1325, 0, 0) InsertRow Post (ll_dw_handle, 1357, 0, 0) Post (ll_dw_handle, 1313, 0, 0) Post (ll_dw_handle, 1312, 0, dw_1 getrow ()) Post (ll_dw_handle, 1315, 0, dw_1 getrow ()) Post (ll_dw_handle, 1325, 0, 0) The Update Post (ll_dw_handle, 1357, 0, 0) Post (ll_dw_handle, 1338, 0, 0) Post (ll_dw_handle, 1304, 0, 0) SaveAs Dialog Post (ll_dw_handle, 1338, 0, 0) Post (ll_dw_handle, 1305, 0, 0) Print the Post (ll_dw_handle, 1303, 0, 0) Retrieve (yield) Post (ll_dw_handle, 1306, 1, 0) Post (ll_dw_handle, 1320, 0, 0) Cancel Post (ll_dw_handle, 1320, 0, 0) By testing found that using Post (ll_dw_handle, 1305, 0, 0), can make the data window pop-up dialog saveas, after further experiment, found the wparam and lparam parameters are: the meaning of saveas type and savefilename the address of the string, so we can use of sending a message to make data window content is saved as a text file, and then read the file can get data, I test code in the pb application: The Function of integer SndMsg (long hWnd, long uMsg, long wp, & amp; Ref string filename) library "user32. DLL" Alias For "SendMessageA "Long ll_dw_handle Ll_dw_handle=handle (dw_1) String s S="c: \ 111. TXT" SndMsg (ll_dw_handle, 1305, 2, s) If you want to write a data window plugins, just get the data window handle, I will point here so far, CodePudding user response:
I want to send the id number CodePudding user response:
To pbdw90 window above not clear, I am sending an id number CodePudding user response:
reference 4 floor yxd_666666 response: above not clear, I'm going to send an id number to pbdw90 window Send the id number, this is a content, news is wm_settext? Settext cannot send dw, because dw itself cannot be edited, when you click on a column, pb generates a on the column on the edit box, you can grab handle to the edit box, and then send the wm_settext CodePudding user response:
I use a window detector to detect only pbdw90 window, no edit box appears CodePudding user response:
I test code in the pb application: The Function of integer SndMsg (long hWnd, long uMsg, long wp, & amp; Ref string filename) library "user32. DLL" Alias For "SendMessageA "Long ll_dw_handle Ll_dw_handle=handle (dw_1) String s S="c: \ 111. TXT" SndMsg (ll_dw_handle, 1305, 2, s) This code will result in pb software breakdown CodePudding user response:
Use the following function can capture the edit box WindowFromPoint VB statement Declare the Function WindowFromPoint Lib "user32" Alias "WindowFromPoint" (ByVal xPoint As Long, ByVal yPoint As Long) As Long Description Return contains a handle to the window of the specified point, ignore the shielding and hidden and transparent window The return value Long, contains a handle to the window of the specified point, such as the point where the specified window does not exist, it returns 0 Parameter list The parameter types and description XPoint Long, x value YPoint Long, y point value CodePudding user response:
refer to the eighth floor lzp_lrp response: with the following function can capture the edit box WindowFromPoint VB statement Declare the Function WindowFromPoint Lib "user32" Alias "WindowFromPoint" (ByVal xPoint As Long, ByVal yPoint As Long) As Long Description Return contains a handle to the window of the specified point, ignore the shielding and hidden and transparent window The return value Long, contains a handle to the window of the specified point, such as the point where the specified window does not exist, it returns 0 Parameter list The parameter types and description XPoint Long, x value YPoint Long, y point value No, or taken the pbdw90 window handle CodePudding user response:
Also suggested that the current focus only when the data window will have the edit box, if the focus switched to another window, the edit box, there is no If you still can only obtain pbdw90 window handle, there is no way