Paradox Community

Items in pnews.paradox-programming

Subject:Re: sendmessage
Date:Fri, 21 Dec 2018 12:58:33 +1100
From:Robert MacMillan <macfam@bigpond.net.au>
Newsgroups:pnews.paradox-programming
Does anyone know how to extend this little snippet of code to extract 
the text in the window - function WM_GETTEXT and move it to a string?

Thanks

On 29/08/2003 5:34 AM, Liz wrote:
> Oak,
>
> OK, found ShowWindow() and code to use it....
>
> Ran this code (in a script), which uses the constants (below) in
> order, used a breakpoint to step through each ShowWindow so I had time
> to see what each did:
>
> uses USER32
>    ShowWindow(windowHandle CLONG, windowState CLONG)
> endUses
>
> method run(var eventInfo Event)
>
> var
>   liWindowHandle longint
>   tc TCursor
> endvar
>
> enumWindowNames(":priv:wNameTbl.db")
> if not tc.open(":priv:wNameTbl.db") then
>   errorShow()
>   return
> endIf
>
> ;// use WindowName field to be sure
> ;// you get the right instance if more than
> ;// one of the same app could be open
> if not tc.locate("ClassName","Notepad") then
>   msgStop("","Not Found!")
>   return
> endif
>
> liWindowHandle = longint(tc."Handle")
> tc.close()
>
> ShowWindow(liWindowHandle, 0)
> ShowWindow(liWindowHandle, 1)
> ShowWindow(liWindowHandle, 2)
> ShowWindow(liWindowHandle, 3)
> ShowWindow(liWindowHandle, 4)
> ShowWindow(liWindowHandle, 5)
> ShowWindow(liWindowHandle, 6)
> ShowWindow(liWindowHandle, 7)
> ShowWindow(liWindowHandle, 8)
> ShowWindow(liWindowHandle, 9)
> ShowWindow(liWindowHandle, 10)
>
> endMethod
>
> ShowWindow() constants and integer value of constant (based on a
> little Delphi form I wrote):
> 0  SW_HIDE
> 1  SW_SHOWNORMAL
> 2  SW_SHOWMINIMIZED
> 3  SW_MAXIMIZE
> 4  SW_SHOWNOACTIVATE
> 5  SW_SHOW
> 6  SW_MINIMIZE
> 7  SW_SHOWMINNOACTIVE
> 8  SW_SHOWNA
> 9  SW_RESTORE
> 10 SW_SHOWDEFAULT
>
> Results were:
> started with window not-maximized, not-active on screen
> 0-window disappeared
> 1-window appeared in same place, not active
> 2-window minimized
> 3-window maximized, not active, on top of others
> 4-window restored, not active
> 5-no change
> 6-window minimized
> 7-no change
> 8-no change
> 9-restored, on top, not active
> 10-no change
>
> Liz
>
>
> Oak Hall wrote:
>>
>> Thanks very much, both good pages, didn't see anything about controling
>> another application from paradox, such as minimize and maxime
>>
>>  http://paradoxtips.free.fr/ showed how to do it to ALL but not an
>> individual windo handle, maybe this cannot be done.
>>
>> Thanks
>> Oak
>>


Copyright © 2004 thedbcommunity.com