npuleio
asked on
New MFC ActiveX Control
Hello everyone!!!
I'm trying to create a new MFC ActiveX Control, and I put a static text and a slider control in the resource window, I put also AfxEnableControlContainer( ); in the InitInstance but when I compile the project and I put the component in a new test project I see like a white rectangle and it doesn't show that static text and the slider.... may I have missed something?....
Even when I run the project it is like no component is shown....
Thanks to everyone...
ciao
Luigi
I'm trying to create a new MFC ActiveX Control, and I put a static text and a slider control in the resource window, I put also AfxEnableControlContainer(
Even when I run the project it is like no component is shown....
Thanks to everyone...
ciao
Luigi
Here is a tutorial: http://www.codeguru.com/cp p/com-tech /activex/c ontrols/ar ticle.php/ c5517/
ASKER
Hello pgnatyuk,
thanks for the tutorial but I think it wasn't really useful. I tried to follow the tutorial creating a new component STATIC based, and I put a slider control and compiled. Then I created a new test project, tried to add the control but I didn't see the slider in the control..
I tried also to create a new activex control based on none since there isn't in the dropdown the choice for a window or a frame container, then I put again a slider. Created again a test project (Unit Test Wizard), tried to select the component project to test but it reports "Unable to load or locate assembly"...
Indeed if I create a new project MFC application to put the control on the resource window, it reports "The ActiveX control "ControlName" could not be instantiated"...
So what I am missing in this Visual Studio 2008?....I thought once the control wizard is completed I should have the minimal to show the control in a new resource application..
Suggests?...
Thanks
thanks for the tutorial but I think it wasn't really useful. I tried to follow the tutorial creating a new component STATIC based, and I put a slider control and compiled. Then I created a new test project, tried to add the control but I didn't see the slider in the control..
I tried also to create a new activex control based on none since there isn't in the dropdown the choice for a window or a frame container, then I put again a slider. Created again a test project (Unit Test Wizard), tried to select the component project to test but it reports "Unable to load or locate assembly"...
Indeed if I create a new project MFC application to put the control on the resource window, it reports "The ActiveX control "ControlName" could not be instantiated"...
So what I am missing in this Visual Studio 2008?....I thought once the control wizard is completed I should have the minimal to show the control in a new resource application..
Suggests?...
Thanks
ASKER
OK I think I found by myself this thing about the message I reported before. Just it was because I recreated project many times so in the registry there were many CLSID entries for the same project.
But now I have a question: which settings should have a MFC ActiveX Control to show the contents of resource when I add an instance on a test MFC Application where actually it shows an empty box when I should see a static text and a button?
Thanks
Ciao
Luigi
But now I have a question: which settings should have a MFC ActiveX Control to show the contents of resource when I add an instance on a test MFC Application where actually it shows an empty box when I should see a static text and a button?
Thanks
Ciao
Luigi
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.