THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 27/03/2004 at 08:35, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 8.206
Platform:
Language(s) : C++ ;
---------
Hi,
Im trying to create a preferences dialog but im not sure what I need to do.
I created the basic classes to represent a preference dialog
class MyPrefsDialog: public PrefsDlg_Base
{
public:
MyPrefsDialog(PrefsDialogHookClass *hook) : PrefsDlg_Base(ID_PLUGIN,hook) { }
};
class MyPrefs: public PrefsDialogHookClass
{
public:
virtual SubDialog *Alloc() { return gNew MyPrefsDialog(this); }
virtual void Free(SubDialog *dlg) { gDelete(dlg); }
};
But I don't know how to actually initialize it, this is what I thought it would be
MyPrefs prefs;
MyPrefsDialog *dlg=static_cast<MyPrefsDialog*>(prefs.Alloc());
prefs.Register(ID_PLUGIN,"Testing");
But this crashes cinema when clicking on preferences under the edit menu.