Jump to content

Embedd A Bowserwindow In An Own Form


Recommended Posts

Hi,

I found the following code (for embedding a browserwindow in an own form)

http://www.autoitscript.com/forum/index.ph...topic=16041&hl=

I wonder if it is possible to do the same thing via COM /ActiveX ?

Because I'm interested in resizing the Browserwindow so that the whole document is showen - wihtout scrollbars ...

#include "GUIConstants.au3"
$dll = DLLOpen("cwebpage.dll")

$hwnd = GUICreate("Browzer",600,600,-1,-1,$WS_SIZEBOX+$WS_SYSMENU)
$pos = WinGetClientSize($hwnd)

DLLCall($dll,"long","EmbedBrowserObject","hwnd",$hwnd)


GUISetState()

DLLCall($dll,"long","DisplayHTMLPage","hwnd",$hwnd,"str","file://c:\Test.doc")

While 1
$msg = GUIGetMsg()
    If $msg = -3 Then ExitLoop
    $newpos = WinGetClientSize($hwnd)
    If Not @error And $newpos[0] <> $pos[0] And _
        $newpos[1] <> $pos[1] Then
        $pos = $newpos
        DLLCall($dll,"none","ResizeBrowser","hwnd",$hwnd,"int",$pos[0],"int",$pos[1])
    EndIf
WEnd
$ret = DLLCall($dll,"long","UnEmbedBrowserObject","hwnd",$hwnd)

greetings mozart90

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...