Freezing Type Information

When the user requests that the application be run or built, the host calls the FreezeShape method to freeze the dynamic type information. After FreezeShape has been called, no additional changes can take place.

The FreezeShape method is simple to implement with a global flag. The flag is set to True when FreezeShape is called, as in the following example:

STDMETHODIMP CMyDesigner::FreezeShape
(
    void
)
{
    m_fFreezeShape = TRUE;
    return S_OK;
}

The m_fFreezeShape flag is reset to False in the class factory for the visual designer.