Sign in to follow this  
Followers 0
mozart90

Embedd A Bowserwindow In An Own Form

2 posts in this topic

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

Share this post


Link to post
Share on other sites



HELP FILE, look up guictrlcreateobj

Share this post


Link to post
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
Sign in to follow this  
Followers 0