I am trying to learn how to do ActiveX controls in assembly.

What I am trying to figure out:

- Proper implementation of a font object.
- How to pass structures as parameters.

Thanks in advance for any help.

Here is what I have so far.

KetilO

11-09-2004,17 dl, New upload
11-10-2004,13 dl, Added more properties, methods and events
Posted on 2004-11-02 08:32:55 by KetilO
About structures: best is to declare your dll as free threaded. This means that marshalling is never needed and you can pass any pointers as in a normal dll (your dll must be thread-safe, though). And you don't need to define your structures in IDL.

If you want/need to use marshalling structures there are 2 ways:

- use the VT_RECORD variant (and use the standard, typelib-based marshaller)
- write your own marshalling code
Posted on 2004-11-03 03:10:42 by japheth
Hi japheth

Thanks for your reply.
Seem like I don't need structures after all.

New upload at the top.

KetilO
Posted on 2004-11-09 07:02:33 by KetilO
Hi all

New upload at the top.

- Added more properties, methods and events

KetilO
Posted on 2004-11-10 08:38:04 by KetilO
calling AddRow with a parameter causes a GPF :-)

calling AddCol after AddRow doesnt work?
Posted on 2004-11-10 08:52:05 by japheth
Hi japheth

Adding columns to a populated grid will probably not be supported.

If you use AddRow with a parameter, the parameter must be a pointer to a structure. The structure must match the number of columns and column types.
I really need to find a better way. Any suggestions?

KetilO
Posted on 2004-11-10 09:13:00 by KetilO
Hi KetilO
Trying to use the control inside VB6 crashes the IDE immediately when it is inserted on a form :(

Regards

Biterider
Posted on 2004-11-10 09:25:20 by Biterider
> Trying to use the control inside VB6 crashes the IDE immediately when it is inserted on a form Sad

VB5 works :)

> I really need to find a better way. Any suggestions?

does this structure contain the contents of the columns?
Then as a first and simple solution I would suggest a BSTR as parameter, using TAB or ";" to separate the columns (like in excel).
Posted on 2004-11-10 09:31:35 by japheth
Hi,
Tested on VB.NET, but didn't work... :?

Regards,

Biterider
Posted on 2004-11-10 12:42:31 by Biterider
Hi japheth

Yes, the structure contains the content of the columns.
A tab separated BSTR seem like the solution I will go for. Thanks.

KetilO
Posted on 2004-11-10 13:22:44 by KetilO
Hi Biterider

I am using VB6 and has no problems. Try to unregister and then register the ocx again.

I will tyy .net tomorrow.

KetilO
Posted on 2004-11-10 13:25:31 by KetilO
Hi KetilO
Have you made some advances with your control?

Regards,

Biterider
Posted on 2004-12-03 08:45:11 by Biterider
Hi Biterider

I have been busy doing other projects + improving on the RAGrid.dll that is the basis control for this project. I have tested on .net but RAGridOcx is not recognized as a control.

KetilO
Posted on 2004-12-03 09:10:03 by KetilO