Solved

How do I display an Active X control

Posted on 1998-08-07
13
195 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
  • 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
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 
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 300 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

ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Modbus - whats the maximum I can store in one register? 4 79
Problem to file 3 74
Problem to event 3 96
Capture logon name 13 73
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
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 video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

770 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