AnsweredAssumed Answered

vrf getting Vee's hWnd

Question asked by g.nied on Jun 9, 2003
Hi Craig,

here is my solution for finding the hWnd of the own VEE program:

1) get the current process ID with Kernel.GetCurrentProcessId
2) get first desktop window with
   hwnd=User.GetWindow(User.GetDesktopWindow,GW_CHILD)
3) get next window with hWnd=User.GetWindow(hwnd, GW_HWNDNext)
   stop, if no more windows found
4) read that windows processID with User.GetWindowThreadProcessId(hWnd,0)
5) compare it to the ID from 1)
6) if equal, compare its class name User.GetClassNameA(hWnd) with yours
   (HP/AgilentVEE)
7) stop if found or goto 3)



best regards,

G. Nied

-------------------------------------------------------------------------
Georg Nied  - Software-Development - Hansestr.7 - 51149 Cologne - Germany
Tel: +49 2203 9770915 - Fax: +49 2203 9770924 - eMail:info@gn-software.de
-------------------------------------------------------------------------


To: Craig.McIntyre@Tenix.com
    vrf@it.lists.it.agilent.com


---
You are currently subscribed to vrf as: rsb@soco.agilent.com
To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list,  email "vrf@it.lists.it.agilent.com". 
If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com".

Outcomes