| View previous topic :: View next topic |
| Author |
Message |
CodeScript Moderator Team

Joined: 08 Jun 2003 Posts: 1060 Location: India
|
Posted: Tue Mar 02, 2004 4:23 pm Post subject: |
|
|
Well with the risk of upsetting others I would say probably adding :
| Code: | @hwnd(<DlgID>)
where <DlgID>) is 0 based index of the dialog. |
in addition to what already exists would be very useful in avoidng unecessary workarounds and gives better control too in such situations. I think VDS runtime already has to maintain a record of these and so may not be so much overhead either. _________________ Regards
- CodeScript
Give your application a professional look with the VDSGUI Extension |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
|
| Back to top |
|
 |
jules Professional Member


Joined: 14 Sep 2001 Posts: 1043 Location: Cumbria, UK
|
Posted: Tue Mar 02, 2004 5:15 pm Post subject: |
|
|
Well I have a philosophical objection to using a C-like name in VDS, especially when there is already a function that can return a window ID, namely @winexists(). However, I take CodeScript's point that there isn't an easy way to get the window id of a specific child dialog. I wasn't thinking of that, probably because I don't usually need to display more than one instance of a dialog at any one time (it gets pretty hairy, handling the events.)
I seem to recall the one time I needed to do this, I did the following. Since the window is always active when you show it, I got its id by using @winactive right after the dialog show, and then stored the result in a hidden text element on the dialog itself. Then I could retrieve it whenever I wanted using @dlgtext. You could call the hidden element hwnd if you want to.  _________________ The Tech Pro
www.tech-pro.net |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Fri Mar 05, 2004 1:54 pm Post subject: |
|
|
| jules wrote: | Well I have a philosophical objection to using a C-like name in VDS, especially when there is already a function that can return a window ID, namely @winexists(). However, I take CodeScript's point that there isn't an easy way to get the window id of a specific child dialog. I wasn't thinking of that, probably because I don't usually need to display more than one instance of a dialog at any one time (it gets pretty hairy, handling the events.)
I seem to recall the one time I needed to do this, I did the following. Since the window is always active when you show it, I got its id by using @winactive right after the dialog show, and then stored the result in a hidden text element on the dialog itself. Then I could retrieve it whenever I wanted using @dlgtext. You could call the hidden element hwnd if you want to.  |
Well I don't think you need to change VDS Jules you already have a function in VDS that will return the child window ID's it's just that it's not explained in the VDS help file very well. Everyone just use the @window() function. This can return the Window ID of any child window. I have already sent Skit some VDS code to use this function so I don't know why he is asking these questions. Maybe I will go ahead and finish that unit that will make it a little easier to use. Also to get the Window ID/hwnd for a child window on a VDS dialog it's real easy
%A = @winexists(~BUTTON1)
How hard is that? _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Sat Mar 06, 2004 2:14 am Post subject: |
|
|
| Skit3000 wrote: | I'm always in trouble with that @window() function. I know you explained me a few times, but I always get different results...  |
That's ok Skit I have my DSU in the works to make using it a bit easier  _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
|