AXControl is a class that can be treated like any other control in win32forth, except it is enabled to host an activex component. A short example of it's usage:
window win
start: win
axcontrol ax
win start: ax
s" MSCAL.Calendar" axcreate: ax
autosize: ax
The example here hosts a calandar control by it's progid. In order to see this work properly, you need to have that activex control installed on your machine. ProgID's may also have some version control to them. "MSCAL.Calendar.7" as the progid would only host version 7 of the caladar control.
You may also use the string of the clsid that you want to use instead of the progid, if it suits your purposes better. Ex:
s" {8E27C92B-1264-101C-8A2F-040224009C02}" axcreate: ax
autosize: ax
You may also use a url if you want:
s" http://www.google.com" axcreate: ax
autosize: ax
You may also give it html code, if it is proceeded by "MSHTML:" Ex:
s" MSHTML:<HTML><BODY>Hello World!</BODY></HTML>" axcreate: ax
autosize: ax
Just having the control there is nice, but the REAL trick is to communicate with it and exchange data back and forth. The way that this is done is by getting the control's interface and using it.
:CLASS AXControl <SUPER CHILD-WINDOW
AXControl Base class for ActiveX controls
:M AXUCreate: ( ustr -- )
calls unicode creation function
:M AXCreate: ( str len -- )
Initialize the ActiveX control
:M QueryInterface: ( ppv riid -- flag )
flag is true on error
;CLASS
End of AXControl class
Document $Id: AXControl.htm,v 1.10 2007/05/26 10:24:12 dbu_de Exp $