Share via


Providing Flicker-Free Activation

OverviewHow Do IFAQSample

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 . For example:

DWORD CMyCtrl::GetControlFlags()
{
    return COleControl::GetControlFlags() | noFlickerActivate;
}

The code to include this flag is automatically generated if you select the Flicker-Free Activation option on the Advanced ActiveX Features page when creating your control in ControlWizard.

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