PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

ActiveX in PPL is a reality, well almost!!!

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:

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:
ActiveX.jpg
Good job, Alain. I really think this will pay off in the end. This will open the possibilties of PPL dramatically!
PointOfLight · 04 Nov 2005, 15:35 UTC
Personally, I think this feature is awesome. You've definitely cemented PPL's place at the top of the development list with this one.
Hi guys,

Not too fast! :)

The PIDE is going to have to be modified to allow for ActiveX controls (this alone will take a while) and the ActiveX event's trapping is far from done as well. Don't expect the ActiveX controls fully working until a good month or so.

PPL is not at the top of PocketPC's development environments. I doubt it will ever be. I am always behind the big guys, I don't have WinCE 5 support, I don't have any plans for it in the next 6 months at least. The PIDE will never be as good as some commercial IDE and the language itself probably has a lot of bugs remaining.

It's a long road and the amount of help I can get is very very limited.
PointOfLight · 04 Nov 2005, 17:12 UTC
All right, let me restate my comment then. PPL is definitely at the top of the charts where low-cost environments are concerned. And to be honest, I went through several of the top IDEs when I was judging software fo the PocketPC Magazine Awards, and just because a product costs a lot and has a lot of developers working on it doesn't mean it's good. And when you consider that (if I'm correct) you're really the only one working on PPL, that makes it even more impressive. As for the WM5 support, I've heard rummors that the first crop of WM5 machines are buggy as all getout anyway, so by the time you get that support in they might finally be stable :)
hahaha!

Kornalius,

you are just too stink'n humble! :P

I am not oblivious to the current state of PPL. However, in my post I stated that this particular advancement will open the "possibities" of PPL.

My view of PPL is always a "future" PPL. I do believe that PPL WILL be at the top of the programming languages. I tell you why.

1. I have tried almost every option for programming with the PPC.
-Some programs let you make games only, but must be programmed on the PC.
-Others let you program with forms, on the PC, and the PPC, but no game programming options.
-One lets you program simple Games and full Form based programs, but you have to use the PC to program (no option for directly programming on the pc).
-Native compiled languages are much harder to learn, and almost exclusively must be programmed on the PC, and until PPL came along, the only way to have decent speed in full 2D games.

2. Addressing everyone of these concerns, PPL has it all in the works. PPL is the only program that allows direct programming on the PPC with ability to write Games and soon full Form based programs. PPL is the fasted NON-Native compiled language in every aspect. This is not even including the PASM features which will be available! PPL is simple for beginners, yet has advanced features like OOP which it's competetors don't.

3. After years and years of testing almost every language, I have bought the ones that I really felt were good. I own NS Basic, I own AppForge, I own Visual Studios(C#, C++ etc.). With all this knowledge I can say that PPL is the closest to a perfect langauge for the PPC as I have found.

You are doing great! Here is to the future of PPL!

Cheers!