• Welcome to Theos PowerBasic Museum 2017.

CWindow ActiveX Control Hosting using OLECON.INC - Nested Controls?

Started by Guy Perrin, January 13, 2012, 01:30:45 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Guy Perrin

ISSUE: Can OLECON.INC be modified to facilitate the hosting of ActiveX Composite Controls (i.e. nested controls)?

The Windows API Wrapper Reference CHM Help file entry for the OLE Container presented in OLECON.INC contains the following comment:

"Controls that act as containers of other controls, such tab controls, aren't supported. Also, some controls written purposely for VB or with VB won't work."

This functionality (nested controls) is provided for by the CComCompositeControl Class in Microsoft's ATL Library.

Having read the source code for the CComCompositeControl Class, I have a familiarity with what is involved in providing this functionality.

I would like to modify OLECON.INC so that the CComCompositeControl (ATL) Class functionality can be available to me in PowerBasic for Windows 10, and have those modifications incorporated into the OLECON.INC file (thus maintaining the Open Source integrity of Jose's massive project).

I would like some help and assistance from like-minded programmers (Jose ... anybody ... ?)

BACKGROUND AND REASONS

BASIC was my first programming language (following closely by Z80 Assembler) (1982).  This was the ROM BASIC Interpreter on the Tandy Model I.
First professional gig was programming in a merchant bank using GWBasic (1986), where my business partner had created some interesting screen layouts using the box drawing characters, which we extended to a basic "windowing" system using the screen memory paradigm of the time.  These character based UI's were our bread and butter till Windows 3.11. The GUI design used to consume 50% of our development time.  The algoriths just 5%.  The rest ... debugging :-)

So, I'm in my 30th year of programming PC's using BASIC (although there have been many languages, os's and hardware platforms along the way).
Been using PowerBasic for a couple of years now (used TurboBasic back in the day), but it is only since the release of PBWin10 and Jose's Windows API Wrappers II that I now consider the PBWin environment mature enough to jump into some useful UI programming using PBWin10.

What serious programmer wouldn't love PB's low level access ("coding to the metal"), but I really love a nice looking and powerful GUI.
The GUI wheel does not have to be reinvented, there are some outstanding ActiveX controls out there which handle 99% of my GUI requirements (http://www.codejock.com).

Modifying OLECON.INC so that ActiveX Composite Controls (nested controls) can be hosted will immediately allow me to access the powerful and DEBUGGED functionality of these ActiveX controls, leaving me with time to be truly creative with the main purpose of the programs that I write (hey, wasn't that the original promise of Windows back in the day?).

OLECON.INC is an amazing piece of coding work.
It is "peppered" thoughout with plenty of OC_DP("<debug message>") calls, so I assume that this is a "work in progress".

So, the plan is to get the Composite Control functionality working in OLECON.INC ... are you in?

José Roca

Yes, you can do it. Implement it in a different file, e.g. OLECON2.INC, and we will try it to see if it works. I have zero experience with composite OCX controls. My main goal implementing the Ole Container was to host the WebBrowser control without having to use third party containers such ATL.DLL.

Guy Perrin

Thank you for your prompt reply Jose.
Will start drawing up the battle plans.