| |
|
|
|
Source watts on the 15.07.2007 from the MMJ-Quellcodesammlung (Dietmar horn) in The Babyklappe on XProfan.Com stored:
Bitmaps: *.JPG and *.GIF (too animated GIFs) with the ATL.DLL Show
of Michael Wodrich
-------------------- for the HTML-Control
$H windows.ph
Def Atlaxwininit(0) !atl.dll,AtlAxWinInit
Def Atlaxcreatecontrol(4) !atl.dll,AtlAxCreateControl
Declare Atl&
Atl&=UseDLL(atl.dll)
Atlaxwininit()
--------------------
several Parameter give back: goes über a structure on the best
The vorderen boxes are The Parameter, The last both are The Rückgabewerte
Struct PictBoxStru = hWnd&, X&,Y&,Width&,Height&, DlgID&, BildPfad$(260), Box&, Web&
here The procedure
Proc CreatePictureBox
Parameters PictBoxParms&
Declare WebPfad$
for v7.0 is one small ploy necessary,
there The reaches otherwise not strukturiert ansprechbar are
Declare PictBoxParms#,Save&
Dim PictBoxParms#, PictBoxStru area with structure arrange (Zeiger on strukturierte data)
Save& = PictBoxParms# this Zeiger secure
PictBoxParms# = PictBoxParms& whom übergebenen Zeiger (on Box1# and Box2#) with the structure slip
here can I now on The übergebenen data grab
With PictBoxParms#
.Box& = Control(STATIC,,$50000000,.X&,.Y&,.Width&,.Height&,.hWnd&,.DlgID&,%hInstance,$200)
WebPfad$ = file:/// + .BildPfad$
.Web& = Control(AtlAxWin,WebPfad$,$50300000,0,0,Width(.Box&),Height(.Box&),.Box&,0,0)-HTML-Contol lay out
EndWith
PictBoxParms# = Save& Original-area restore
Dispose PictBoxParms# and from the memory Remove
ENDPROC
-- Hauptprogramm --
Window 0,0-800,600 640,480
Window 0,0-640,480 640,480
User Messages 16
2 reaches for The Parameter and Rückgabewerte arrange
Declare Box1#, Box2#
Dim Box1#, PictBoxStru
Dim Box2#, PictBoxStru
The reaches fill
With Box1#
.hWnd& = %hWnd
.X& = 10
.Y& = 10
.Width& = 200
.Height& = 200
.DlgID& = 2000
.BildPfad$ = LoadFile $ (Image loading!,Bilddateien (JPG,JPEG,GIF)|*.JPG;*.JPEG;*.GIF)
.Box& - becomes in the CreatePictureBox allocated (the STATIC-welt)
.Web& - becomes in the CreatePictureBox allocated (the HTML-Control)
EndWith
With Box2#
.hWnd& = %hWnd
.X& = 220
.Y& = 10
.Width& = 200
.Height& = 200
.DlgID& = 2001
.BildPfad$ = LoadFile $ (Image loading!,Bilddateien (JPG,JPEG,GIF)|*.JPG;*.JPEG;*.GIF)
.Box& - becomes in the CreatePictureBox allocated (the STATIC-welt)
.Web& - becomes in the CreatePictureBox allocated (the HTML-Control)
EndWith
Call the procedure
CreatePictureBox Box1#
CreatePictureBox Box2#
Hauptschleife
While 1
Waitinput
Case %Umessage=16:Break
Endwhile
release the both Controls apiece appeal
Destroywindow(Box1#.Web&)
Destroywindow(Box1#.Box&)
Destroywindow(Box2#.Web&)
Destroywindow(Box2#.Box&)
The reaches not forget
Dispose Box1#
Dispose Box2#
The DLL again entladen
FreeDLL Atl&
End
|
|
|
| |
|
|