Using an Unclipped Device Context
If you are absolutely certain that your control does not paint outside its client rectangle, you can realize a small but detectable speed gain by disabling the call to IntersectClipRect
that is made by COleControl
. To do this, remove the clipPaintDC flag from the set of flags returned by COleControl::GetControlFlags. For example:
DWORD CMyAxOptCtrl::GetControlFlags()
{
DWORD dwFlags = COleControl::GetControlFlags();
dwFlags &= ~clipPaintDC;
return dwFlags;
}
The code to remove this flag is automatically generated if you select the Unclipped Device Context 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
คำติชม
https://aka.ms/ContentUserFeedback
เร็วๆ นี้: ตลอดปี 2024 เราจะขจัดปัญหา GitHub เพื่อเป็นกลไกคำติชมสำหรับเนื้อหา และแทนที่ด้วยระบบคำติชมใหม่ สำหรับข้อมูลเพิ่มเติม ให้ดู:ส่งและดูข้อคิดเห็นสำหรับ