Click here to Skip to main content
15,898,950 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: network programming! Pin
Roger Stoltz15-May-06 6:09
Roger Stoltz15-May-06 6:09 
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 
Hello Roger,

Sorry I've a while to answer your question
Roger Stoltz wrote:
Alton Williams wrote:
When I build and register the control.


I interpret this as you get an assertion or runtime error when you try to register the component after a successful build. Correct?


No, Rog! It builds and get registered perfectly when I place the end result onto another project be it VC dialogue or a VB form the aproppriate developer app (MSVC6 or MSVB6) crashes. I if it would be a HWND problem
I'll explain the issue more clearly.
I've created three controls;

  1. A control called child1ctrl which is a subclass of "EDIT"
  2. Another called child2ctrl is that of "STATIC"
  3. A third one called holderctrl which isn't subclassed


Firstly, I design controls 1 & 2 individually either as single project or two projects (that's not relevant). Naturally it builds and registers the two controls ok. At this stage when add either (1 or 2) to other projects. Works perfectly.

It's when I am design control no 3. I'm what is the cause for concern
I do the follow

  • I go through the wizardD'Oh! | :doh:
  • I add controls (1 and 2) to the project and it generates the wrapper
    classes.(CChild1 & CChild2)
  • I make these as two member variables one of each class.
  • I write code to create the two child windows


I have no problems with build and the control registers with no problems. Its when I add HolderControl onto other projects I drag and drop it on a diaglogue box and crashes VC++ (msdev.exe). Likewise I do it on a for VB (VB.exe) comes down.

To begin with I wrongfully wrote code to create (1 & 2) in WM_CREATE.
class CHolder{

virtual void PreSubclassWindow();
private:
CChild1 m_ctrl1;
CChild2 m_ctrl2;
BOOL m_bFlag


Then
void CHolderCtrl::PreSubclassWindow()
{
    m_bFlag = m_ctrl1.CreateControl(clsid, NULL, dwStyle, rect, this)
&&     m_ctrl2.CreateControl(clsid, NULL, dwStyle, rect, this);  
                
     COleControl::PreSubclassWindow();
} 


On debugging what is causing the crashing seems lie with the first call to create for the first "window" so the second call doesn't happen.Confused | :confused: Confused | :confused:

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

I don't if I'm clearer now.

I going to repost the question on this an other forums, until I get an answer.

Thanks for your help nonetheless.

Alton
AnswerRe: ActiveX control as parent Pin
Roger Stoltz7-Jun-06 10:49
Roger Stoltz7-Jun-06 10:49 
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 

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.