Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Alert dialog

    SDK Help
    0
    4
    647
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Helper
      last edited by

      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));
          
          
          
          
          }
          
          
          
          
          }
          
          
          
      
      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 12/10/2003 at 03:04, xxxxxxxx wrote:

        There's MessageDialog() and QuestionDialog() with various options.

        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 14/10/2003 at 05:23, xxxxxxxx wrote:

          Thanks.
          MessageDialog is not in any of the index lists in the SDK documents, where should I report this documentation bug?
          Arvan

          1 Reply Last reply Reply Quote 0
          • H
            Helper
            last edited by

            THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

            On 14/10/2003 at 13:22, xxxxxxxx wrote:

            In the latest documentation (for 8.2) I've added all global functions to the Alphabetical Index, so now MessageDialog() is there. (I also recommend, since you're using Windows, that you download the .chm file instead. The built in index of the .chm file is really great.)

            1 Reply Last reply Reply Quote 0
            • First post
              Last post