Hi,
After weeks of hard work, I am finally able to import, display, position, get properties, set properties and call methods for ActiveX controls. My next step is to work on events integration which is a big task in itself.
Attached is a screenshot of this little program written in PPL:
Please let me know how you guys feel about this new feature. If anyone has any clues how events catching works please feel free to give a start.
After weeks of hard work, I am finally able to import, display, position, get properties, set properties and call methods for ActiveX controls. My next step is to work on events integration which is a big task in itself.
Attached is a screenshot of this little program written in PPL:
- Code:
// ActiveX controls
#include "windows.ppl"
func WndProc(hWnd$, Msg$, wParam$, lParam$)
ok$ = true;
case (Msg$)
/*WM_PAINT:
global(a$);
struct(ps$, PAINTSTRUCT);
struct(rt$, RECT);
hdc$ = GetDC(hWnd$);
BeginPaint(hWnd$, &ps;$);
GetClientRect(hWnd$, &rt;$);
FillRect(hdc$, &rt;$, GetStockObject(WHITE_BRUSH));
if (a$)
ActiveXDraw(a$);
end;
EndPaint(hWnd$, &ps;$);
ReleaseDC(hWnd$, hdc$);
ok$ = false;*/
WM_CLOSE:
global(a$);
FreeActiveX(a$);
a$ = NULL;
end;
return (ok$);
end;
func winmain
h$ = newform({OLE}, {OLEClass}, &wndproc;);
ShowWindow(h$, SW_SHOW);
global(a$);
a$ = ActiveX(h$, "COMCTL.Slider.1");
SetActiveXPos(a$, 10, 10, 400, 40);
o$ = ActiveXObject(a$);
SetProperty(o$, "Max", 100);
SetProperty(o$, "Value", 50);
b$ = ActiveX(h$, "COMCTL.Slider.1");
SetActiveXPos(b$, 10, 100, 150, 120);
c$ = ActiveX(h$, "COMCTL.ProgCtrl.1");
SetActiveXPos(c$, 10, 200, 150, 220);
o$ = ActiveXObject(c$);
SetProperty(o$, "Max", 100);
SetProperty(o$, "Value", 50);
d$ = ActiveX(h$, "COMCTL.TreeCtrl.1");
SetActiveXPos(d$, 200, 100, 400, 300);
e$ = ActiveX(h$, "ComCtl2.UpDown.1");
SetActiveXPos(e$, 10, 300, 24, 324);
f$ = ActiveX(h$, "QuickTime.QuickTime.4");
SetActiveXPos(f$, 500, 200, 600, 300);
return (true);
end;
Please let me know how you guys feel about this new feature. If anyone has any clues how events catching works please feel free to give a start.
Attachments:
