English
Forum

ATL.DLL

 

Frank
Tretter
be new here and this is my first question.
I wanted to me yourself a small Browser basteln and I already plenty in the network for found. my Program using IWebBrowser2.ph.
the demonstration the as example thereby was runs too well. now would like I but the Menu strain and the command How Mark, copy insert.

unfortunately can the begot Browserfenster neither The Tastenkompination STRG+A To.
hope it can someone help and show How to the Menu extended.
with the command AppendMenuBar komm I clear, but not the Procedure CallMethod The in the demonstration using we.

here the demonstration
CompileMarkSeparation
 $H c:XProfan 8.0INCLUDEWindows.ph
 $H c:XProfan 8.0INCLUDEIWebBrowser2.ph
Declare a$, a&, a#, b#, Error&, ATLdll&, WebControl&, IUnknown&, IWebBrowser&
Dim a#,1024
Dim b#,256
Def CLSIDFromString(2) !ole32,CLSIDFromString
Def AtlAxWinInit(0) !atl.dll,AtlAxWinInit
Def AtlAxGetControl(2) !atl.dll,AtlAxGetControl

Proc CallMethod-----------------------------------------------Interface-Methoden aufrufen

    Parameters IFace&,Method&
    Declare VTable&
    VTable&=long(IFace&,0)
    Method&=long(VTable&,Method&*4)
    case %pcount=2:return call( Method&,IFace& )
    case %pcount=3:return call( Method&,IFace&,&(3) )
    case %pcount=4:return call( Method&,IFace&,&(3),$(4) )
    case %pcount=5:return call( Method&,IFace&,&(3),&(4),&(5) )
    case %pcount=6:return call( Method&,IFace&,&(3),&(4),&(5),&(6) )
    case %pcount=7:return call( Method&,IFace&,&(3),&(4),&(5),&(6),&(7) )
    case %pcount=8:return call( Method&,IFace&,&(3),&(4),&(5),&(6),&(7),&(8) )

EndProc

proc WebOpen-------------------------------------------------------------Irgendwas öffnen

    Parameters X$
    ~RedrawWindow(%hwnd,0,0,$485)
    casenot len(x$):return
    ~MultiByteToWideChar(0,0,addr(x$),-1,a#,250)
    clear b#
    CallMethod(IWebbrowser&,~Navigate,a#,b#,b#,b#,b#)

EndProc

*****************************************************************************************
windowstyle 16+8+4+2+1
window 10,10-700,500
usermessages 16
ATLdll&=usedll(atl.dll)
AtlAxWinInit()
WebControl&=control(AtlAxWin,Shell.Explorer.1,$50000000,0,0,0,0,%hwnd,0,0,$200)
~GetClientRect(%hwnd,b#)
setwindowpos WebControl&=0,0-long(b#,8),long(b#,12)
Werte von Error& und IUnknown& im Fehlerfall ausgeben lassen!
Error&=AtlAxGetControl(WebControl&,addr(IUnknown&))
IWebBrowser2-Interface ermöglicht Kontrolle über das WebControl
clear a#,b#
a$=~IID_IWebBrowser2
~MultiByteToWideChar(1,1,addr(a$),-1,a#,80)-------------ANSI zu WideChar
CLSIDFromString(a#,b#)----------------------------------String zu Interface-ID
Error&=CallMethod(IUnknown&,~QueryInterface,b#,addr(IWebBrowser&))
--damit es beim Start nicht so leer aussieht
CallMethod(IWebBrowser&,~GoHome)
--------------------------------------------------------------------FensterMenü
appendmenubar 101,Zurück
appendmenubar 102,Vorwärts
appendmenubar 103,Abbrechen
appendmenubar 104,Aktualisieren
appendmenubar 105,Startseite
appendmenubar 106,Suchen
appendmenubar 107,Datei öffnen
appendmenubar 108,Ordner öffnen
appendmenubar 109,URL öffnen
--------------------------------------------------------------------Eingabeschleife

while 1

    if %key=4----------------------------------------------Grössenänderung des Fensters

        ~GetClientRect(%hwnd,b#)
        setwindowpos WebControl&=0,0-long(b#,8),long(b#,12)

    elseif menuitem(101)-----------------------------------Zurück

        CallMethod(IWebBrowser&,~GoBack)

    elseif menuitem(102)-----------------------------------Vorwärts

        CallMethod(IWebBrowser&,~GoForward)

    elseif menuitem(103)-----------------------------------Abbrechen

        CallMethod(IWebBrowser&,~Stop)

    elseif menuitem(104)-----------------------------------Aktualisieren

        CallMethod(IWebBrowser&,~Refresh)

    elseif menuitem(105)-----------------------------------Startseite

        CallMethod(IWebBrowser&,~GoHome)

    elseif menuitem(106)-----------------------------------Suchen

        CallMethod(IWebBrowser&,~GoSearch)

    elseif menuitem(107)-----------------------------------Datei öffnen

        a$=loadfile$(Bitte Bild oder HTML-Datei wählen,*.*)
        WebOpen a$

    elseif menuitem(108)-----------------------------------Ordner  öffnen

        a$=choosedir$(Bitte Ordner wählen)
        WebOpen a$

    elseif menuitem(109)-----------------------------------URL öffnen

        a$=input$(Bitte Web-Adresse eingeben:,URL:,)
        WebOpen a$
        endif----------------------------------------------------------------------

        while 1----------------------------Warten, bis Aktion ausgeführt ist

            sleep 200
            CallMethod(IWebBrowser&,~get_Busy,addr(a&))
            casenot a&:break
            endwhile------------------------------------------------------------
            waitinput
            case %umessage=16:break-----------Ende
            endwhile-----------------------------------------------------------------Ende Eingabeschleife
            destroywindow(WebControl&)
            case ATLdll&:freedll ATLdll&
            End

Greeting Fränki
 
Seit 2008 endlich XProfan 10, ist einfach klasse
02/19/07  
 



means to that first should You your Source too with
CompileMarkSeparation ummanteln (this is in all Forums normally) - Codes with Smilies drin will none look at. You can your Posting Yes Edit. And then would it yet helpful if you The additional PH too as DateiAnhang beifügst - because these heard not to that XProfanumfang.

we knoe neither which XProfanversion You uses (have Yes nothing indicated) - the could You but too in your Signatur write.

The reaches a# and b# go not disposed .

To denne.

@Admins: I find these Postingform comes in last Time very often to - we should to the Post one Vorstellungsgespräch lead - inform of/ one Erklärungsseite howTo mail. I werd the time zusammenbasteln.
 
02/19/07  
 



Nachtrag: Content the iwebbrowser2.ph
CompileMarkSeparation
02/19/07  
 




Frank
Tretter
Sorry, know me there not yet so from.
I have XProfan 8. iwebbrowser2.ph watts from you already here displayed, thanks.

now attempt I with the the code once more.
CompileMarkSeparation
 $H c:XProfan 8.0INCLUDEWindows.ph
 $H c:XProfan 8.0INCLUDEIWebBrowser2.ph
Declare a$, a&, a#, b#, Error&, ATLdll&, WebControl&, IUnknown&, IWebBrowser&
Dim a#,1024
Dim b#,256
Def CLSIDFromString(2) !ole32,CLSIDFromString
Def AtlAxWinInit(0) !atl.dll,AtlAxWinInit
Def AtlAxGetControl(2) !atl.dll,AtlAxGetControl

Proc CallMethod-----------------------------------------------Interface-Methoden aufrufen

    Parameters IFace&,Method&
    Declare VTable&
    VTable&=long(IFace&,0)
    Method&=long(VTable&,Method&*4)
    case %pcount=2:return call( Method&,IFace& )
    case %pcount=3:return call( Method&,IFace&,&(3) )
    case %pcount=4:return call( Method&,IFace&,&(3),$(4) )
    case %pcount=5:return call( Method&,IFace&,&(3),&(4),&(5) )
    case %pcount=6:return call( Method&,IFace&,&(3),&(4),&(5),&(6) )
    case %pcount=7:return call( Method&,IFace&,&(3),&(4),&(5),&(6),&(7) )
    case %pcount=8:return call( Method&,IFace&,&(3),&(4),&(5),&(6),&(7),&(8) )

EndProc

proc WebOpen-------------------------------------------------------------Irgendwas öffnen

    Parameters X$
    ~RedrawWindow(%hwnd,0,0,$485)
    casenot len(x$):return
    ~MultiByteToWideChar(0,0,addr(x$),-1,a#,250)
    clear b#
    CallMethod(IWebbrowser&,~Navigate,a#,b#,b#,b#,b#)

EndProc

*****************************************************************************************
*****************************************************************************************
windowstyle 16+8+4+2+1
window 10,10-700,500
usermessages 16
ATLdll&=usedll(atl.dll)
AtlAxWinInit()
WebControl&=control(AtlAxWin,Shell.Explorer.1,$50000000,0,0,0,0,%hwnd,0,0,$200)
~GetClientRect(%hwnd,b#)
setwindowpos WebControl&=0,0-long(b#,8),long(b#,12)
Werte von Error& und IUnknown& im Fehlerfall ausgeben lassen!
Error&=AtlAxGetControl(WebControl&,addr(IUnknown&))
IWebBrowser2-Interface ermöglicht Kontrolle über das WebControl
clear a#,b#
a$=~IID_IWebBrowser2
~MultiByteToWideChar(1,1,addr(a$),-1,a#,80)-------------ANSI zu WideChar
CLSIDFromString(a#,b#)----------------------------------String zu Interface-ID
Error&=CallMethod(IUnknown&,~QueryInterface,b#,addr(IWebBrowser&))
--damit es beim Start nicht so leer aussieht
CallMethod(IWebBrowser&,~GoHome)
--------------------------------------------------------------------FensterMenü
appendmenubar 101,Zurück
appendmenubar 102,Vorwärts
appendmenubar 103,Abbrechen
appendmenubar 104,Aktualisieren
appendmenubar 105,Startseite
appendmenubar 106,Suchen
appendmenubar 107,Datei öffnen
appendmenubar 108,Ordner öffnen
appendmenubar 109,URL öffnen
--------------------------------------------------------------------Eingabeschleife

while 1

    if %key=4----------------------------------------------Grössenänderung des Fensters

        ~GetClientRect(%hwnd,b#)
        setwindowpos WebControl&=0,0-long(b#,8),long(b#,12)

    elseif menuitem(101)-----------------------------------Zurück

        CallMethod(IWebBrowser&,~GoBack)

    elseif menuitem(102)-----------------------------------Vorwärts

        CallMethod(IWebBrowser&,~GoForward)

    elseif menuitem(103)-----------------------------------Abbrechen

        CallMethod(IWebBrowser&,~Stop)

    elseif menuitem(104)-----------------------------------Aktualisieren

        CallMethod(IWebBrowser&,~Refresh)

    elseif menuitem(105)-----------------------------------Startseite

        CallMethod(IWebBrowser&,~GoHome)

    elseif menuitem(106)-----------------------------------Suchen

        CallMethod(IWebBrowser&,~GoSearch)

    elseif menuitem(107)-----------------------------------Datei öffnen

        a$=loadfile$(Bitte Bild oder HTML-Datei wählen,*.*)
        WebOpen a$

    elseif menuitem(108)-----------------------------------Ordner  öffnen

        a$=choosedir$(Bitte Ordner wählen)
        WebOpen a$

    elseif menuitem(109)-----------------------------------URL öffnen

        a$=input$(Bitte Web-Adresse eingeben:,URL:,)
        WebOpen a$
        endif----------------------------------------------------------------------

        while 1----------------------------Warten, bis Aktion ausgeführt ist

            sleep 200
            CallMethod(IWebBrowser&,~get_Busy,addr(a&))
            casenot a&:break
            endwhile------------------------------------------------------------
            waitinput
            case %umessage=16:break-----------Ende
            endwhile-----------------------------------------------------------------Ende Eingabeschleife
            destroywindow(WebControl&)
            case ATLdll&:freedll ATLdll&
            End

2 kB
Hochgeladen:02/19/07
Downloadcounter125
Download
 
Seit 2008 endlich XProfan 10, ist einfach klasse
02/19/07  
 




Uwe
''Pascal''
Niemeier
Hello Frank!

the WebBrowser-Control becomes complete over so-called COM-Interfaces gesteuert; the counts even for Clipboard-activities. with Messages (How with Edits) is there nothing To machen; for must even one new interface called go.
These procedure ought to help:
CompileMarkSeparation
proc CopyToClipBoard----------------------------------------------------------

    declare IOleCommandTarget&,CLSID$
    CLSID$={b722bccb-4e68-101b-a2bc-00aa00404770}--IID_IOleCommandTarget
    ~MultiByteToWideChar(1,1,addr(CLSID$),-1,a#,80)--ANSI zu WideChar
    CLSIDFromString(a#,b#)---------------------------String zu Interface-ID
    CallMethod(IWebBrowser&,~QueryInterface,b#,addr(IOleCommandTarget&))
    CLSID$={de4ba900-59ca-11cf-9592-444553540000}--CGID_MSHTML (Kommandomodus)
    ~MultiByteToWideChar(1,1,addr(CLSID$),-1,a#,80)--ANSI zu WideChar
    CLSIDFromString(a#,b#)---------------------------String zu Interface-ID
    CallMethod(IOleCommandTarget&,4,b#,15,0,0,0)-----Exec : IDM_COPY
    CallMethod(IOleCommandTarget&,~Release)----------Interface freigeben
    endproc----------------------------------------------------------------------

an routine to that Mark wealthy I yet to!

@ iF: are you sure, that DISPOSE on the End of program  so wichig is?

HTH
Pascal
 
02/20/07  
 




RGH
Uwe Pascal Niemeier
@ iF: are you sure, that DISPOSE on the End of program  so wichig is?


with Win9x (moreover heard too Win ME) fundamentally Yes, there otherwise the memory oiftmals not till the next Neustart released becomes.
Win2000/XP/Vista regelt the Betriebssystem with End of program The release in all rule if need be self.

but for all that ought to one itself accustom with DIM reserved memory fundamentally through DISPOSE again freizugeben. ought to one this z.B. time in a procedure forget, has one very quick Problems ...

Greeting
Roland
 
Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4
02/20/07  
 




Frank
Tretter
Vielen Thanks first for speedy Help. the bring me already moreover.
If I still The routine for the Markiern bekomm be I happy and it has me very helped.

can unfortunately not always same Answer, be not always on the PC and to that program missing as The Time.

Greeting Fränki
 
Seit 2008 endlich XProfan 10, ist einfach klasse
02/21/07  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

3.771 Views

Themeninformationen



Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie