THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 02/10/2003 at 05:30, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 8.200
Platform: Windows ;
Language(s) : C.O.F.F.E.E ; C++ ;
---------
I'd like to present an error message to the user, and could not find a simple API method to do this. I have therefore tried to write my own dialog, which works on Mac OS X with 8.100, but crashes when I dismiss the dialog on Windows 2000 with 8.200 - am I doing something obviously wrong, or should I be reporting this as a bug?
Here's my dialog class
class MyAlert : public GeModalDialog {
LONG message;
LONG suggestion;
MyAlert(LONG m, LONG s);
virtual Bool CreateLayout();
public:
static void ShowAlert(LONG m, LONG s);
};
MyAlert::MyAlert(LONG m, LONG s) :
message(m),
suggestion(s)
{
}
Bool MyAlert::CreateLayout()
{
SetTitle(GeLoadString(IDS_ALERT));
Bool ok = NULL != AddStaticText(GADGET_ALERTMESSAGE, 0, 0, 0, GeLoadString(message), BORDER_NONE);
if(ok)
{
ok = NULL != AddStaticText(GADGET_ALERTSUGGESTION, 0, 0, 0, GeLoadString(suggestion), BORDER_NONE);
}
if (ok)
{
ok = ok && AddDlgGroup(DLG_OK);
}
return ok;
}
void MyAlert::ShowAlert(LONG m, LONG s)
{
MyAlert alert(m, s);
if (!alert.Open())
{
GePrint(GeLoadString(m));
GePrint(GeLoadString(s));
}
}