Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

AfxOleUnlockControl

 

Unlocks the class factory of the specified control.


      BOOL AFXAPI AfxOleUnlockControl(
   REFCLSID clsid 
);
BOOL AFXAPI AfxOleUnlockControl(
   LPCTSTR lpszProgID 
);

clsid

The unique class ID of the control.

lpszProgID

The unique program ID of the control.

Nonzero if the class factory of the control was successfully unlocked; otherwise 0.

A control is locked with AfxOleLockControl, so that dynamically created data associated with the control remains in memory. This can significantly speed up display of the control because the control need not be created and destroyed every time it is displayed. When you are ready to destroy the control, call AfxOleUnlockControl.

Example

// Unlock control's (Microsoft Calendar Control) class factory.

AfxOleUnlockControl(_T("MSCAL.Calendar"));

Requirements

Header: <afxwin.h>

Show: