B
Ben Taylor
Hi,
I am experiencing a very strange problem with VC++.NET
2002 and I'm hoping somebody can tell me what I'm doing
wrong or whether it's a bug.
I created an ActiveX control and added some properties,
and added some controls to the propertiy page and linked
the properties to them, at this point they were working
fine - the on changed event handlers were firing, the
properties were updating, the control's OnDraw was being
called and it and the other main control class's member
functions had visibility of the relevant variables and
they were correct. I then added some extra functionality
to the OnDraw procedure, and a global function. Then, for
no apparent reason, the control's properties were not
being updated when I edited the property page, and the
control's OnDraw event wasn't being called. I tried
putting InvalidateControl() in the event handlers for the
properties, such as OnBackColorChanged in the control's
property page .cpp file, but that didn't work as they
weren't being called themselves! I couldn't understand
why, so I decided to start a new project and get to the
stage I was at when they were working, then copy and
paste the code I had written in bit by bit to see what
was causing the problem.
To add to my woe, this happened: I added one property to
the new control, a custom OLE_COLOR property, by choosing
the Add Propety option from the _DMyControl interface in
the MyControlLib node in class view, and added the
property fine. Then, when I came to add the second
property, in only had an option of property or function,
as opposed to property, function or variable, and it
displayed a totally different dialog box when I clicked
property! This time it had 'put' and 'set' options, so I
clicked help and it said these were only for ATL
projects!? This is bizarre, and totally confusing.
Does anybody know what is going on and what to do about
it? Is it a bug? If so, is there a patch available?
Thanks very much
Regards
Ben Taylor
I am experiencing a very strange problem with VC++.NET
2002 and I'm hoping somebody can tell me what I'm doing
wrong or whether it's a bug.
I created an ActiveX control and added some properties,
and added some controls to the propertiy page and linked
the properties to them, at this point they were working
fine - the on changed event handlers were firing, the
properties were updating, the control's OnDraw was being
called and it and the other main control class's member
functions had visibility of the relevant variables and
they were correct. I then added some extra functionality
to the OnDraw procedure, and a global function. Then, for
no apparent reason, the control's properties were not
being updated when I edited the property page, and the
control's OnDraw event wasn't being called. I tried
putting InvalidateControl() in the event handlers for the
properties, such as OnBackColorChanged in the control's
property page .cpp file, but that didn't work as they
weren't being called themselves! I couldn't understand
why, so I decided to start a new project and get to the
stage I was at when they were working, then copy and
paste the code I had written in bit by bit to see what
was causing the problem.
To add to my woe, this happened: I added one property to
the new control, a custom OLE_COLOR property, by choosing
the Add Propety option from the _DMyControl interface in
the MyControlLib node in class view, and added the
property fine. Then, when I came to add the second
property, in only had an option of property or function,
as opposed to property, function or variable, and it
displayed a totally different dialog box when I clicked
property! This time it had 'put' and 'set' options, so I
clicked help and it said these were only for ATL
projects!? This is bizarre, and totally confusing.
Does anybody know what is going on and what to do about
it? Is it a bug? If so, is there a patch available?
Thanks very much
Regards
Ben Taylor