Hi, I am working my way up from C4D R16, yes, I have all C4D Studio versions R13-R23, but I really want this to work.
SDK = C4D R16
Here is the code:
/////// The customGUI's data class ///////////////
class SliderData : public CustomGuiData
{
typedef CustomGuiData super;
public:
virtual Int32 GetId() { return LIBRAY_ID; } //Gets the ID# we defined at the top for this gizmo
virtual CDialog *Alloc(const BaseContainer &settings)
{
// Next line compiler complains
GeDialog *dlg = gNew MyCustomGui(settings, GetPlugin());
if (!dlg) return NULL;
return dlg->Get();
}
virtual void Free(CDialog *dlg, void *ud)
{
if (dlg)
{
// Old does not work
//gDelete((GeDialog*&) dlg); //Free the memory used by allocating dlg
//New - no complaints
DeleteObj((GeDialog*&) dlg); //Free the memory used by allocating dlg
}
}
So my question is - how can I rewrite the line containing gNew, so that it works again? (Works fine in R14).
I have tried with NewObj() and NewObjClear() - compiler still complains.
-Ingvar