Click here to Skip to main content
15,891,704 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRetreiving SafeArray Values from IDispatch Pin
Member 17837689-Mar-05 3:27
Member 17837689-Mar-05 3:27 
GeneralCapturing screenshots of fullscreen dos applications. Pin
Renny[RuS]9-Mar-05 2:50
Renny[RuS]9-Mar-05 2:50 
GeneralRe: Capturing screenshots of fullscreen dos applications. Pin
David Crow9-Mar-05 3:02
David Crow9-Mar-05 3:02 
GeneralRe: Capturing screenshots of fullscreen dos applications. Pin
Renny[RuS]9-Mar-05 9:34
Renny[RuS]9-Mar-05 9:34 
GeneralMixed Language Programming(c++ & fortran) Pin
lavate malllik9-Mar-05 1:25
lavate malllik9-Mar-05 1:25 
GeneralRe: Mixed Language Programming(c++ & fortran) Pin
Cedric Moonen9-Mar-05 2:16
Cedric Moonen9-Mar-05 2:16 
GeneralRe: Mixed Language Programming(c++ & fortran) Pin
lavate malllik9-Mar-05 16:59
lavate malllik9-Mar-05 16:59 
GeneralDispatch Issue Pin
Lord Phoenix9-Mar-05 1:19
Lord Phoenix9-Mar-05 1:19 
Hi everyone,

I am quite new here, and actually no so old to C/C++ either.

Has for my problem:

I've been trying to build an OCX wrapper for 3 DLLs. The wrapper itself will also provide a bit of extra functionality of it's own, but
it is basically a wrapper.
So far no big deal. Actually it's even working without any problems. The problem, has I see it, is more of an aestecthics nature than anything else.
You see, although I profit from this by geting to keep and use the DLLs, I'm doing this for a friend and therefore it's suposed to be done a certain way. Which of course is exactly why he askaed for it in the first place, because he doesn't have the time nor the inclination to look into it himself, and also because he has never written a COM or OCX before.

The issue itself has to do with how you access the functionality of each of the DLLs. I am certain everyone here has at least once used the TreeView control. This control has a Nodes colection which can be used to perform certains task on all of the nodes, return a node count, or access an individual node. Now in my case I don't have sutch a collection, what I do have are methods, and some properties that come with the wrapper and one of the reasons for wrappers existance. But I do want them accessed like the Nodes property, meaning I need to implement one Property for each DLL, which will be used to expose that particular DLL functions and properties.

I've build the classes, no problem there. They all have Automation support. Properties and methods are all in place. So far no problem.

Now if this was a COM I wouldn't be asking the next two questions. I know it's probably something I should know, but the truth is I don't.

First : Since I am using Automation on my Wrapper Classes they actually become available for instantiation, which I don't want. So first question is, how do I stop this ?

Second : How do I implement my properties ? In a COM this is kind of easy, just a part of the Dispatch coding. However every attempt of doing it in the sameway has resulted in loss of Wizard assistance (not really a problem), lots of compiler warnings, and a fare number of crashes. So if anyone know how I can implement this I'd apreciate it, preferably with a pointer to some sample code, has I learn a lot faster that way. Just to remove any doubts, what I am trying to do is create 3 properties, one for each DLL, that will then be used to expose the properties and methods provided by that DLL. This would be done in the form:

Wrapper.DLL1.Function1
Wrapper.DLL1.FunctionN
Wrapper.DLL2.Function1
Wrapper.DLL2.FunctionN
Wrapper.DLL3.Function1
Wrapper.DLL3.FunctionN

Sorry, I don't mean to be annoying or anything by explaining it all like this, it's just I am always afraid I somehow mess up and can't get the message through.

I appreciate any help you can provide.

Best regards,

----------------
Lord Phoenix
----------------
GeneralMDI application with a Tree View Pin
rgchezhian9-Mar-05 1:01
rgchezhian9-Mar-05 1:01 
GeneralToolTips Display Pin
nripun9-Mar-05 0:44
nripun9-Mar-05 0:44 
GeneralRe: ToolTips Display Pin
Blake Miller9-Mar-05 4:44
Blake Miller9-Mar-05 4:44 
QuestionHow to prevent the user from moving a dialog dynamically Pin
caykahve8-Mar-05 23:53
caykahve8-Mar-05 23:53 
AnswerRe: How to prevent the user from moving a dialog dynamically Pin
Iain Clarke, Warrior Programmer9-Mar-05 1:45
Iain Clarke, Warrior Programmer9-Mar-05 1:45 
GeneralRe: How to prevent the user from moving a dialog dynamically Pin
caykahve9-Mar-05 23:46
caykahve9-Mar-05 23:46 
AnswerRe: How to prevent the user from moving a dialog dynamically Pin
Ravi Bhavnani9-Mar-05 3:20
professionalRavi Bhavnani9-Mar-05 3:20 
GeneralProblem in making a dll Pin
Rakesh G Pai8-Mar-05 23:02
Rakesh G Pai8-Mar-05 23:02 
GeneralRe: Problem in making a dll Pin
David Crow9-Mar-05 3:06
David Crow9-Mar-05 3:06 
GeneralRe: Problem in making a dll Pin
Blake Miller9-Mar-05 4:49
Blake Miller9-Mar-05 4:49 
GeneralRe: Problem in making a dll Pin
Rakesh G Pai9-Mar-05 18:07
Rakesh G Pai9-Mar-05 18:07 
GeneralDLL Extension MFC Pin
sunit58-Mar-05 22:32
sunit58-Mar-05 22:32 
GeneralRe: DLL Extension MFC Pin
deldeep10-Mar-05 3:23
deldeep10-Mar-05 3:23 
Questionhow can i multi-language in CListCtrl. Pin
Kind8-Mar-05 22:20
Kind8-Mar-05 22:20 
GeneralstartService from non-admin account Pin
Musen808-Mar-05 21:18
Musen808-Mar-05 21:18 
GeneralRe: startService from non-admin account Pin
Blake Miller9-Mar-05 5:01
Blake Miller9-Mar-05 5:01 
GeneralSystem Info Pin
Anonymous8-Mar-05 20:27
Anonymous8-Mar-05 20:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.