PDA

View Full Version : ActiveX Control



Death Engineer
01-06-2004, 05:04 PM
I'm trying to convert a c++ dll into an ActiveX control and I'm having trouble reconciling all the data types. Does anyone have experience doing this sort of thing?

Should I use the class wizard (MSVC++) or just stick with good ol' hand code?

DE

JIMINATOR
01-06-2004, 05:34 PM
lol, good luck. unfortunately I learned c++, mfc & winders, but grazed different pastures at the time the activex stuff came out...

Death Engineer
01-06-2004, 09:07 PM
Ugh. The class wizard is driving me nuts. I think I found a way to make it work, but I'm having linking issues now. Lets just say that I have a .h file that defines some methods that are in .lib files (in the \vc98\lib directory). All I should have to do is #include "file.h", right?

The external error I'm getting suggests that it doesn't know where to find the .lib files.

JIMINATOR
01-06-2004, 09:22 PM
oh yeah, you will have a separate path for lib files, you need to make sure it includes your controls....

Death Engineer
01-08-2004, 06:51 PM
I've got a more specific question now. ;) I need to sent a VB user type to an ActiveX control (written in Visual C++). I know how to define the type in VB and in C++, but the transition is a little hairy.

I need to figure out how to pass a UDT as a VARIANT type (to satisfy the MFC class). Any ideas?

DE

JIMINATOR
01-08-2004, 07:49 PM
clueless, but take a look at the following urls (using google cache allows you to bypass logging into the site)

http://216.239.41.104/search?q=cache:JlWgF...tart=1&ie=UTF-8 (http://216.239.41.104/search?q=cache:JlWgFVYG7OIJ:www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_20186170.html+pass+a+UDT+as+a+VARIANT+type++MFC+ class&hl=en&start=1&ie=UTF-8)

http://216.239.41.104/search?q=cache:Mtr-j...tart=2&ie=UTF-8 (http://216.239.41.104/search?q=cache:Mtr-jBNaTwEJ:www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_20110974.html+pass+a+UDT+as+a+VARIANT+type++MFC+ class&hl=en&start=2&ie=UTF-8)


if those don't help.... well, looks pretty painful to me...

Death Engineer
01-12-2004, 11:23 PM
Bah. I finally dumped the ActiveX control and went with a plain ol' c++ dll. :P Had some debugging issues to be worked out, but things seem to be in working order.

<<Hybrid>>
01-22-2004, 03:00 PM
sorry for digging up old thread, but are you guys programmers?

if so, then thats really interesting. Is program and game programming same as PHP programming? i htink it haven&#39;t same commands.

btw try your powers with DarkBasic, its pretty easy, but asks strong nerves. All i can create is landscape, todays date and &#33;GOING&#33; clock :lol:

JIMINATOR
01-22-2004, 03:59 PM
Hybrid, there are tons of programming languages and programming platforms (operating systems). Everything is extremely different, although there are generic principles that apply (loops, blocks, etc).
Find something you like and learn how to program it. The next time will be easier...

Death Engineer
01-22-2004, 04:12 PM
Yes. Now that I have graudated, I suppose I could call myself a fledgling professional programmer. :) I still have much to learn.

BTW: I&#39;ve got that ActiveX control working now. Using a few tricks I knew and some help from www.experts-exchange.com, I finally figured it out. :cool:

<<Hybrid>>
01-22-2004, 04:49 PM
yeah, i searched for template today and found bunch of programming language :wacko:

i am out lol