CMvcVisualPart::OnCreate
virtual BOOL CMvcVisualPart::OnCreate(void)
Called after the visual part has been created to allow the creation and/or initialization of additional children
Defined in: MvcVisualPart.h
Return Value
Returns TRUE if the call was successful
Comments
This function is called by Create after it
has finished creating this visual part. If you have additional
members to create or initialize, you can do so by overriding this
member in your derived classes. The difference between this
function and OnInitialUpdate is the latter is called later
in the construction and initialization process. By the time
OnInitialUpdate is called, all children should be created
and, if this is a viewport, the model will be set. This
function is called just after creation and cannot depend on
the model being ready. But, if you need to create addition
children or sibilings (i.e. scroll bars), override this
member and do so there. You could accomplish the same thing
by overriding Create and calling the base class implementation
first. The advantage of overriding this function versus Create
is the signature of OnCreate doesn't change whereas Create
has a different number of arguments depending on the level of
derivation. Therefore, a wrapper class can't override Create
because a wrapper class wouldn't know which prototype to
override.
See Also
Create