Home>>Programming>>C++Builder>> » How to Use the Project Templates in C Builder

How to Use the Project Templates in C Builder

Last Updated on September 11, 2018 By hcyaobin

Using project templates

Templates are predesigned projects that you can use as starting points for your own work. To create a new project from a template:

  1. Choose File|New|Other to display the New Items dialog box.
  2. Choose the Projects tab.
  3. Select the project template you want and choose OK.
  4. In the Select Directory dialog, specify a directory for the new project’s files.

C++Builder copies the template files to the specified directory, where you can modify them. The original project template is unaffected by your changes.
To add projects and project templates to the Object Repository, see following:

Communicating with the Help Manager

ICustomHelpViewer provides four functions that can be used to communicate system information with the Help Manager:

  • GetViewerName
  • NotifyID
  • ShutDown
  • SoftShutDown

The Help Manager calls through these functions in the following circumstances:

  • AnsiString ICustomHelpViewer::GetViewerName() is called when the Help Manager wants to know the name of the viewer (for example, if the application is asked to display a list of all registered viewers). This information is returned via a string, and is required to be logically static (that is, it cannot change during the operation of the application). Multibyte character sets are not supported.
  • void ICustomHelpViewer::NotifyID(const int ViewerID) is called immediately following registration to provide the viewer with a unique cookie that identifies it. This information must be stored off for later use; if the viewer shuts down on its own (as opposed to in response to a notification from the Help Manager), it must provide the Help Manager with the identifying cookie so that the Help Manager can release all references to the viewer. (Failing to provide the cookie, or providing the wrong one, causes the Help Manager to potentially release references to the wrong viewer.)
  • void ICustomHelpViewer::ShutDown() is called by the Help Manager to notify the Help viewer that the Manager is shutting down and that any resources the Help viewer has allocated should be freed. It is recommended that all resource freeing be delegated to this method.
  • void ICustomHelpViewer::SoftShutDown() is called by the Help Manager to ask the Help viewer to close any externally visible manifestations of the Help system (for example, windows displaying Help information) without unloading the viewer.

Add a Comment

Your email address will not be published. Required fields are marked *