Copyright © 2003-2005 MultiMedia Soft 
Return to index  
 
How to manage 3D control templates 
The definition of "3D control template" is very simple: a collection of settings, stored inside a file with .3BT extension, that will be applied to the control all at once. The use of 3D control templates can simplify the support for skinned applications. 
Let's create and use our first button template at Design-time
  • After having edited the button properties as needed, click with your mouse right button the control surface and, from the context menu, select the "Save settings in Normal template..." item as displayed below: 
  •  
     
  • Browse a directory in which you can store the 3D control template and assign it a name, then save it: your 3D template is now saved inside your hard disk and can be used for other buttons. 
  •  
    After this simple operation, say that you need to create one or more buttons, all with the same "look & feel": a very common task, developing an application, that can be sped up using the template you just created.  
  • Select the button you want to modify, then click with your mouse right button the control surface and, from the context menu, select the "Load a 3D Control template..." item as displayed below: 
  •  
     
  • Browse the directory containing the previously saved 3D template and select it: the button under editing will automatically take the settings stored inside the 3D template. 
  • Repeat the operation for all the other buttons that must meet the same "look & feel".  
  • If you would like to apply a 3D template to multiple buttons at once, please, take a look to the chapter Editing multiple controls at once contained inside the How to use the product in your projects section. 
  •  
    As you may note from the image above, there are two kinds of button templates: 
  • Normal template: can be saved and loaded at Design-time using the procedure described above or at Runtime using the SaveTemplate and LoadTemplate methods. Inside this kind of template all the button settings are stored apart from binaries file paths (for pictures, textures, sounds and cursor) and button position over the form. 
  • Extended template: can be saved and loaded at Runtime using the SaveTemplateEx and LoadTemplate methods. Inside this template are stored all of the control settings, including also extra information about the pathnames of binary files such as pictures, sounds or cursor and the control size; note that when using this kind of templates you will have to use the SetTemplateBinDir method in order to setup one or more directories over the target machine from which to get the binary files for pictures, animations, textures, sounds and cursor.. 
  • NOTE 
    Button templates used by 3D Control Magic are fully compatible with templates created with our WYSIWYG application 3D Button Visual Editor, so you can: 
  • Design your controls with 3D Button Visual Editor without having to open your development environment. 
  • Save the edited control templates (both Normal and Extended templates are supported). 
  • Use the saved templates from your development environment at Design-time or directly from your application at Runtime
  •  
     
     
     
     
     
     
     
     
     
     
     
    Copyright © 2003-2005 MultiMedia Soft 
    Return to index