Prototype
bool __cdecl fnPreLoadShapes ( void );
Return value
This function should return true if loading of shapes should continue, otherwise false.
Parameters
None
Remarks
This function gets called before fnSupportsType, fnThemeCount and fnLoadShapes, and can be used to examine data to get information on types supported and number of themes to load. If data is loaded from file, this is a good place to display a file dialog.
If false is returned, the function fnGetLastErrMsg is called. If it contains a description this will be displayed to the user and the loading process is aborted. If the error message is empty, ShapeUp assumes everything is in order and aborts the loading process silently.
If true is returned, the loading process will continue with calls to fnSupportsType.
Notice: If using MFC, be sure to start the function with AFX_MANAGE_STATE(AfxGetStaticModuleState());
Example
bool __cdecl fnPreLoadShapes ( void ) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); CMyDataSpecifierDialog dlg; if (dlg.DoModal() == IDOK) { /* Collect data here */ return true; } return false; }
See Also
Loader API, fnGetLastErrMsg, fnSupportsType, fnThemeCount, fnLoadShapes