Skip to content

Latest commit

 

History

History
22 lines (16 loc) · 1.51 KB

providing-flicker-free-activation.md

File metadata and controls

22 lines (16 loc) · 1.51 KB
description title ms.date helpviewer_keywords ms.assetid
Learn more about: Providing Flicker-Free Activation
Providing Flicker-Free Activation
11/04/2016
MFC ActiveX controls [MFC], flicker-free
flicker, MFC ActiveX controls
activation [MFC], flicker-free
bcb24b77-31d8-44a0-8c58-2ea6213b4c43

Providing Flicker-Free Activation

If your control draws itself identically in the inactive and active states (and does not use windowless activation), you can eliminate the drawing operations and the accompanying visual flicker that normally occur when making the transition between the inactive and active states. To do this, include the noFlickerActivate flag in the set of flags returned by COleControl::GetControlFlags. For example:

[!code-cppNVC_MFC_AxOpt#5] [!code-cppNVC_MFC_AxOpt#13] [!code-cppNVC_MFC_AxOpt#7]

The code to include this flag is automatically generated if you select the Flicker-Free activation option on the Control Settings page when creating your control with the MFC ActiveX Control Wizard.

If you are using windowless activation, this optimization has no effect.

See also

MFC ActiveX Controls: Optimization