ATL ActiveX composite Control and drawing 
Author Message
 ATL ActiveX composite Control and drawing

hi,

I have an ATL composite control that has a strange flicker when being
created.

using the de{*filter*} i figured out this event order.

Create new composite control and put it in the view

each of the activex controls in the composite control gets created, and
drawn(even though they do not show up on the screen)

the composite controls OnCtlColorDlg(to set the background color) gets
called

a bunch of, but usually not all of the controls in the composite control get
drawn again

flicker happens here, the drawn composite control dissapears and then
the composite controls OnCtlColorDlg(to set the background color) gets
called (yes again)

all of the controls in the composite controls get drawn again

we have a working composite control at this point

the view the composite control is getting put in is a CScrollView, and I'm
setting the background color or the scroll view in OnEraseBackground (which
is the only way i've found to do it efectivly)

any pointers on how to get rid of this would be great, usually its not
noticable but sometimes it is and looks horrible

marc



Sun, 01 Feb 2004 02:36:49 GMT  
 ATL ActiveX composite Control and drawing
Hello Marc,

To eliminate flicker in your control, you should consider overriding the
onEraseBackground event. The default implementation of this event clears
the background of the control with the current value of the backColor
property. However, it is not always necessary to repaint the entire area of
the control, and doing so unnecessarily can cause flickering. This is
primarily the case with controls that have a large area or complex paint
logic.

Regards,
Woody



Sun, 01 Feb 2004 23:55:51 GMT  
 ATL ActiveX composite Control and drawing
great, i just made it return 0 and had the app its self setup the background
color(which it did already)

marc



Quote:
> Hello Marc,

> To eliminate flicker in your control, you should consider overriding the
> onEraseBackground event. The default implementation of this event clears
> the background of the control with the current value of the backColor
> property. However, it is not always necessary to repaint the entire area
of
> the control, and doing so unnecessarily can cause flickering. This is
> primarily the case with controls that have a large area or complex paint
> logic.

> Regards,
> Woody



Mon, 02 Feb 2004 01:00:06 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Using ActiveX controls in ATL Composite control

2. How to invoke methods of contained ActiveX control from ATL Composite Control

3. Need help with Owner Drawn Button Class in ATL composite Control

4. scripting - font - ATL Composite Activex Controls

5. ATL composite ActiveX control

6. ATL ActiveX Composite Control WITHOUT a dialog box?

7. ATL(+MFC) Composite control VS MFC ActiveX Contol

8. scripting - font - ATL Composite Activex Controls

9. ATL composite ActiveX control

10. ATL ActiveX Composite Control WITHOUT a dialog box?

11. Help - Problems with Drawing an MFC ActiveX control inside on ATL compsoite control

12. Problems with Drawing an MFC ActiveX control inside on ATL compsoite control

 

 
Powered by phpBB® Forum Software