THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 11/08/2003 at 09:06, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 8.100
Platform: Windows ; Mac ; Mac OSX ;
Language(s) : C++ ;
---------
I have a non-modal dialog (Async_Dialog). When the user clicks on a certain button I am opening another dialog (Layer_dialog) like this:
class AsyncDialog : public GeDialog
{
private:
LayerDialog ldlg;
[...]
ldlg.Open(TRUE,MY_ID,-1,-1);
Ok, now when I dock those two dialogs in my interface and save my layout, next time Cinema 4D starts the AsyncDialog is restored correctly but the second dialog is not. :
I know I can use several Command datas to probably workaround this problem but I don´t like it. It´s kind of dirty to me :) (thanks anyway Thomas ;)
Well, the real problem now is that it should be possible anyway with the RestoreLayout function that I am overloading like:
Bool AsyncTest::RestoreLayout(void *secret)
{
globaldialog = &dlg;
return dlg.RestoreLayout(ID_ASYNCTEST,1,secret);
}
Ok so this works for the AsyncDialog. The Documentation though says:
"If you have more than one dialog you need to look at _<_a class=link href= "mk:@msitstore:d:\programme\microsoft%20visual%20studio\common\msdev98\addins\c4d_sdk_chm_reference.chm::/pages/c4d_commanddata/struct_restorelayout675.html"_>_RestoreLayoutSecret::subid."
Well, but it somehow doesn´t work. But I am sure I am doing something wrong? So I tried to set the subid value of the RestoreLayout() function to my LayerDialog id like this:
Bool AsyncTest::RestoreLayout(void *secret)
{
globaldialog = &dlg;
RestoreLayoutSecret* s = (RestoreLayoutSecret* )secret;
s->subid = MY_ID;
return dlg.RestoreLayout(ID_ASYNCTEST,MY_ID,s);
}
But this doesn´t seem to work. I still get a "Plugin not found". To make a long story short: How is this done???
Thank you
Samir