Click here to Skip to main content
15,911,360 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionException handling Pin
LiYS15-May-06 5:15
LiYS15-May-06 5:15 
AnswerRe: Exception handling Pin
Stephen Hewitt15-May-06 15:54
Stephen Hewitt15-May-06 15:54 
QuestionActiveX control as parent Pin
Alton Williams15-May-06 4:59
Alton Williams15-May-06 4:59 
AnswerRe: ActiveX control as parent Pin
Roger Stoltz15-May-06 5:44
Roger Stoltz15-May-06 5:44 
GeneralRe: ActiveX control as parent Pin
Alton Williams16-May-06 1:53
Alton Williams16-May-06 1:53 
AnswerRe: ActiveX control as parent Pin
Roger Stoltz16-May-06 3:07
Roger Stoltz16-May-06 3:07 
GeneralRe: ActiveX control as parent Pin
Alton Williams5-Jun-06 2:16
Alton Williams5-Jun-06 2:16 
AnswerRe: ActiveX control as parent Pin
Roger Stoltz7-Jun-06 10:49
Roger Stoltz7-Jun-06 10:49 
Alton Williams wrote:
On debugging what is causing the crashing seems lie with the first call to create for the first "window"


Seriously Alton, you have to investigate your own code better than that or no one will ever bother to answer your vague question.

It's perfectly allright to have an ActiveX control as a container for another ActiveX control, you don't have to doubt that.
The reason why this doesn't work in your code is because you've either removed some important stuff or haven't written the important stuff yet.
It's also not very clear what base classes you're subclassing from or why. If you're using MFC to create your controls, the only class you should derive from is COleControl; anything else I would consider highly suspicious and to be removed at once if not given a lot of thought ending with "I've-read-alot-about-it-and-I-know-it's-the-correct-way-to-do-it". Wink | ;)

I suggest you start over with the CHolderCtrl and create it with the ActiveX control wizard.
For every step you take building the functionality of the CHolderCtrl, you should test it with "ActiveX Control Test Container" that ships with MSVC.
Don't add the two contained ActiveX controls to CHolderCtrl until the last step. Make sure they can be inserted in an ordinary ActiveX control container before attempting to add them to CHolderCtrl.


Alton Williams wrote:
Its when I add HolderControl onto other projects I drag and drop it on a diaglogue box and crashes VC++


This feels like the ActiveX control hasn't got all the required interfaces implemented as needed for it to an ActiveX control container.
Have a look here[^] for required interfaces depending on what functionality you want to support.


Alton Williams wrote:
MS Calendar Control 8.0 dosen't behave like this. I has two child ComboBoxes and 50 Statics on it.


Now, this sentence really disturbs me since it makes me wonder if you're under the impression that comboboxes, edit and static controls are ActiveX controls. Unsure | :~
Just to tie up loose ends: comboboxes and static controls are not ActiveX controls!

On the other hand, perhaps this is exactly what you're after; an ActiveX control that looks like a dialog (or similar) with some CEdit/CStatic controls within the window....
If this is the case, you should have a member variable for each control on your window and simply call e.g. CEdit::Create() when you want to create a CEdit control.


Alton Williams wrote:
I going to repost the question on this an other forums, until I get an answer


Well, perhaps not this question, you should investigate your code further and be more precise. But by all means: repost and you might get more replies since this thread is old and probably won't be read by anyone but me.


Alton Williams wrote:
Thanks for your help nonetheless


You're welcome! Rose | [Rose]

--
Roger


It's supposed to be hard, otherwise anybody could do it!

Regarding CodeProject: "resistance is pointless; you will be assimilated"

QuestionGDI and Regions Pin
HakunaMatada15-May-06 4:47
HakunaMatada15-May-06 4:47 
Questionto locate the registry keys for Local Security Policies Pin
narayanagvs15-May-06 4:46
narayanagvs15-May-06 4:46 
Questionerror in debugging directshow filter in loading dll function Pin
yongwpi15-May-06 4:46
yongwpi15-May-06 4:46 
AnswerRe: error in debugging directshow filter in loading dll function Pin
Cedric Moonen15-May-06 4:55
Cedric Moonen15-May-06 4:55 
GeneralRe: error in debugging directshow filter in loading dll function Pin
yongwpi15-May-06 6:13
yongwpi15-May-06 6:13 
AnswerRe: error in debugging directshow filter in loading dll function Pin
Stephen Hewitt15-May-06 18:29
Stephen Hewitt15-May-06 18:29 
GeneralRe: error in debugging directshow filter in loading dll function Pin
yongwpi16-May-06 6:30
yongwpi16-May-06 6:30 
QuestionHide folder Pin
nat2kus15-May-06 4:22
nat2kus15-May-06 4:22 
AnswerRe: Hide folder Pin
David Crow15-May-06 5:55
David Crow15-May-06 5:55 
Questioncheck status CD Pin
photomatic15-May-06 4:06
photomatic15-May-06 4:06 
QuestionRe: check status CD Pin
David Crow15-May-06 6:00
David Crow15-May-06 6:00 
AnswerRe: check status CD Pin
photomatic15-May-06 22:32
photomatic15-May-06 22:32 
QuestionDos printing from Win Xp Pin
mikobi15-May-06 3:15
mikobi15-May-06 3:15 
AnswerRe: Dos printing from Win Xp Pin
basementman15-May-06 5:08
basementman15-May-06 5:08 
QuestionUpdate Views Pin
masnu15-May-06 3:06
masnu15-May-06 3:06 
AnswerRe: Update Views Pin
Cedric Moonen15-May-06 3:09
Cedric Moonen15-May-06 3:09 
GeneralRe: Update Views Pin
masnu15-May-06 3:48
masnu15-May-06 3:48 

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.