C++
BOOL SetView( CAcTcUiPaletteView* pView );
Description
By default, the tool palette creates a CAcTcUiPaletteView view object. This function can be used to substitute a custom view derived from CAcTcUiPaletteView. When a custom view is set, any existing view is destroyed. After a custom view is set, the CAcTcUiToolPalette object on which this function is called assumes ownership of the memory pointed to by pView. The caller must not delete the passed view pointer.
The window of the passed view should not be created before calling this function. The framework will create it when needed.
pView should be a pointer to either CAcTcUiPaletteView or a class derived from CAcTcUiPaletteView.
The ideal way to set the custom view is to override the virtual CAdUiPalette::Create(CAdUiPaletteSet* pParent) method, and then call the base class CAcTcUiToolPalette::Create() method to create the palette. Alternatively, the custom view also can be set by handling the WM_ONCREATE message and calling this function before calling the base class handler. In either case, it is important to call the base class methods for default processing.
If this function succeeds, the return value is non-zero. Otherwise, the return value is zero.
Parameters
Parameters | Description |
---|---|
pView | Input pointer to the view |