Micro Focus QTP (UFT) Forums
get handle of a property sheet - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: get handle of a property sheet (/Thread-get-handle-of-a-property-sheet)



get handle of a property sheet - kalyanR - 09-11-2009

Hi,
I am trying to get the handle of a property sheet (wizard).

I used object spy to see the window class name to be of type "Window".

And the text field is "Installation Program"

When I called Extern.FindWindow("Window","Installation Program") the return value is 0.
If I called Extern.FindWindow(vbNullString,"Installation Program") the return value is different from that found in "hwnd" field through object spy.

I have a declaration of FindWindow at the beginning of the script as

Code:
Extern.Declare minHwnd, "FindWindow", "user32.dll", "FindWindowA",micString, micString

Please help me with this.
Thanks


RE: get handle of a property sheet - Saket - 09-11-2009

check 'regexpwndclass' value at Spy and use it at FindWindow. it must be 'CabinetWClass' for Window and '#32770' for a Dilog Window.
try
Code:
Extern.FindWindow("'CabinetWClass","Installation Program")