?
Solved

How do I display an Active X control

Posted on 1998-08-07
13
Medium Priority
?
215 Views
Last Modified: 2013-11-25
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
0
Comment
Question by:yakky
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 3
  • +1
13 Comments
 
LVL 23

Expert Comment

by:chensu
ID: 1320382
The ActiveX control you are using should be registered properly.
0
 
LVL 7

Expert Comment

by:psdavis
ID: 1320383
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
 

Author Comment

by:yakky
ID: 1320384
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
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
LVL 7

Expert Comment

by:psdavis
ID: 1320385
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
 

Author Comment

by:yakky
ID: 1320386
yep correct.
0
 
LVL 7

Expert Comment

by:psdavis
ID: 1320387
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
 

Author Comment

by:yakky
ID: 1320388
see above
0
 

Author Comment

by:yakky
ID: 1320389
Adjusted points to 300
0
 
LVL 2

Accepted Solution

by:
graber earned 600 total points
ID: 1320390
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
 
LVL 23

Expert Comment

by:chensu
ID: 1320391
>Now insert the Calendar control into the dialog box.

Is the dialog box an ActiveX control container? Did you call AfxEnableControlContainer?
0
 
LVL 23

Expert Comment

by:chensu
ID: 1320392
Just curious, have you solved the problem? If so, how?
0
 
LVL 2

Expert Comment

by:graber
ID: 1320393
Ian
  I did some looking into the pricing.  $99.00 per incident...that isn't cheap
Gregg
0
 
LVL 2

Expert Comment

by:graber
ID: 1320394
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

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
I made this because I wanted to get e-mail with a attached csv file so I'd would be able to import user input into a MS Excel template, but I also wanted to register/save all inputs from each day in a file on the server. 1st - It creates a temp C…
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question