How do I display an Active X control

Iam writting an Active X control, which uses another Active X control.
When I put the child Ole control in a dialog box, the dialog box is nolonger invoked and the child Ole control fails to initialize.

Could someone tell me how I
1. initialize the child Ole control?
2. display the dialog box?

Thanks in advance
Ian Robertson
yakkyAsked:
Who is Participating?
 
graberCommented:
This isn't a direct answer but it will get you there.  What you are attempting to do may not be possible.  At any rate this will get you the answer.  Jump out to microsofts support site http://support.microsoft.com/support/webresponse.asp.  You will have to create an account for yourself.  Once you have done this open a ticket.  The web site will ask you to give you a discription of the problem.  I recommend that you are as concise as possible.  The use several layers of support attempting to aleveate(sp) the obvious.  If the 1st and second level techs have there questions addressed, such as did you register the controls, then they will shoot you to the engineers.  I took a couple of days but they were very good about addressing the answer in theory and practice.  Be careful you only get two freebees anything beyond this and it will cost you...and it aint cheap buster.  Even on the freebees I have had the enginneers call and confirm that the problem was resolved, everything was working ok, and asked what I thought of the program....Will say it is good if you have the cash.
0
 
chensuCommented:
The ActiveX control you are using should be registered properly.
0
 
psdavisCommented:
1) Make sure your control is registered by using the following command line from your \windows\system directory.

regsvr32 control.ocx

If you get an error (385 or so) then you're missing a dll that you're relying on.

If the control is not registered correctly, then when you call your DoModal, then it will just return and do nothing.  Very annoying.

Also make sure that the control is added properly to your project.  Do a 'Project - Add to project - ActiveX components' EVERY time you add a new method or a new property.  Otherwise, you get 'Bad number of parameters'.

Phillip
0
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

 
yakkyAuthor Commented:
Ok let me explain a bit more. Both controls are properly registered.
Try the following for your self. Use visual C++'s ActiveX wizard
to create an active X control. Add a dialog box and then in the ctrl's function which invokes the Aboutbox place a call to invoke the new dialog box.
compile it then run it in the test container. What happens is that first the dialog box is displayed followed by the About box.

Now insert the Calendar control into the dialog box. recompile. What happens is that the dialog box doesnt display, only the about box. Also the Calendar control fails to initialize so none of its methods/property's can be used.

PS the Calendar control does work since Ive tried the same thing as an executable.
0
 
psdavisCommented:
So, do you want a different ActiveX control (calendar) in your current ActiveX's about dialog box, correct?  I've run into this problem before, I'll try to remember.  If I'm incorrect in the assumption, please clarify.

Phillip
0
 
yakkyAuthor Commented:
yep correct.
0
 
psdavisCommented:
yakky,

Go ahead and reject my answer to open it up to other users if you wish.  

The problem that I was encountering was when I added an ActiveX control to a property sheet in an application, not to a dialog box.  I'm afraid I'm not going to be able to help you with this one at this time.  Too busy.

Phillip
0
 
yakkyAuthor Commented:
see above
0
 
yakkyAuthor Commented:
Adjusted points to 300
0
 
chensuCommented:
>Now insert the Calendar control into the dialog box.

Is the dialog box an ActiveX control container? Did you call AfxEnableControlContainer?
0
 
chensuCommented:
Just curious, have you solved the problem? If so, how?
0
 
graberCommented:
Ian
  I did some looking into the pricing.  $99.00 per incident...that isn't cheap
Gregg
0
 
graberCommented:
Ian
  I did some looking into the pricing.  $99.00 per incident...that isn't cheap.  BTW when you get an answer give me a hollar at
garaber@fedex.com and let me know what microsoft has to say.
Gregg
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.