LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
clu clu is offline
external usenet poster
 
Posts: 4
Default GetText Client Access AS400 window API Help

Actually the API calls have not been so horrendous. I have been able
to replace all internal Excel VBA commands for this project without too
much trouble. The last bit is this get text part. I don't need to get
the text in a text file I want to put the text in a variable at runtime
in my excel vba code directly. I already use the clipboard with
success. I have tested SendMessage, GetDlgItemText, GetWindowText,
SetWindowText and have been able to set the text and retrieve it with
these functions but I am not able to get the text from the screen.
When I use wm_SetText or SetWindowText it changes the Title of the
child window. I am then able to get that text. From what I have read
elsewhere in the Groups this indicates that the window is accepting
these commands. The text window may have hidden windows which I
understand slightly after searching the Groups/Web but I am not sure
how to proceed to learn more about this. I used EnumWindows to
retrieve the following results of my open session. Note the Title
"Hello, world!" which was placed there by one of my SetText tests. I
also included info that I retreived from a GUIi Spy Tool. I feel like
I am close but frustrated because I am unclear as to how to proceed.

LEV. CLASSNAME HANDLE PARENT TITLE
0 PCSWS:Main:00400000 590504 0 AS400
1 msctls_statusbar32 656032 590504
1 PCSWS:Oia:00400000 656034 590504
1 PCSWS:Hsb:00400000 656036 590504
1 PCSWS:Pres:00400000 525212 590504 Hello, world!
1 UCMBrkr 524982 590504
2 UCMenu 525008 524982
3 ScrollBar 2360176 525008
4 Hide 787228 2360176
5 MenuToolBar 524984 787228
6 ToolbarWindow32 590526 524984

This is the window information that contains text I wish to get!

{displayed: 1,width: 960,x: 36,y: 119,abs_x: 32,class:
object,MSW_class: "PCSWS:Pres:00400000",abs_y: 115,maximizable:
0,focused: 0,height: 577,active: 0,MSW_id: 2,handle:
525212,minimizable: 0,nchildren: 0,label: "Hello, world!",enabled:
1,TOOLKIT_class: "PCSWS:Pres:00400000"}

I have also come across information regarding HLLAPI

Declare Function hllapi& Lib "PCSHLL32.DLL" (Func&, ByVal DataString$,
Length&, RetC&)

This API is provided by IBM and requires an install I believe.

Any suggestions would be greatly appreciated.



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to GetText() from TextBox under Visual C++ application? Danil Excel Worksheet Functions 0 August 31st 07 11:38 AM
Client Access to iSeries Automation Leslie Excel Programming 10 March 24th 06 03:25 PM
Excel, client access & AS400 Fwed Excel Programming 5 January 30th 06 04:11 PM
Download from Client Access to Excel Archie Excel Discussion (Misc queries) 0 May 5th 05 01:51 PM
Clipboard.GetText Charlie Excel Programming 3 March 28th 05 08:11 PM


All times are GMT +1. The time now is 02:09 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"