AttachToWnd - web automation method

Not available in Open Twebst edition!
Creates a web automation library Browser object from a 'Internet Explorer_Server', 'IEFrame' or 'TabWindowClass' window handle.

Applies to:
Core
  var b = coreObj.AttachToWnd(hWnd);
Arguments:
Remarks:
Returns a Browser web automation library object. The hWnd parameter is the handle of a Internet Explorer_Server, IEFrame or TabWindowClass window of Internet Explorer browser. It could be obtained using other ways than Twebst web automation library features. It could be also obtained by using ieWindow, tabWindow or topWindow properties. This method is useful when you need to automate an existing IE browser instance for which you have a Win32 API window handle.
Example:
// hwnd is a valid handle of a 'Internet Explorer_Server', 'IEFrame' or 'TabWindowClass' window inside IE.
var hwnd    = 0x1C05B8;
var core    = new ActiveXObject("Twebst.Core");
var browser = core.AttachToWnd(hwnd);

browser.Navigate("http://www.codecentrix.com/");
    
See also:
Core | Browser | AttachToNativeBrowser | AttachToNativeElement | AttachToNativeFrame | ieWindow | tabWindow | topWindow | WndToNativeDocument

© 2014 CodeCentrix Software. All rights reserved.