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

    popup like alert("...");

    SDK Help
    0
    3
    435
    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

      On 11/10/2013 at 14:21, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   r14 
      Platform:   Windows  ;   
      Language(s) :     C++  ;

      ---------
      Hi there,

      i am wondering if and how it is possible to add a simple dialog box to an object plugin. just a window with a message and an "ok"-button.

      any input highly appreciated 🙂

      thanks in advance,
      Ello

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

        On 11/10/2013 at 15:13, xxxxxxxx wrote:

        Hi ello,

        you can catch the press of a button on your object's description (parameters in the AM) by
        overriding NodeData::Message() and catching the MSG_DESCRIPTION_COMMAND message.

        >
        > Bool MyObjectPlugin::Message(GeListNode* node, LONG type, void* p_data) {
        > if (type == MSG_DESCRIPTION_COMMAND) {
        > DescriptionCommand* data = reinterpret_cast<DescriptionCommand*>(p_data);
        > if (data && data->id == MYOBJECTPLUGIN_BUTTON) {
        > MessageDialog("My Button was pressed!");
        > }
        > }
        >
        > return SUPER::Message(node, type, p_data);
        > }

        Messages are sent from the main thread. You can safely perform GUI operations.

        Best,
        -Niklas

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

          On 11/10/2013 at 15:29, xxxxxxxx wrote:

          thank you very much!

          1 Reply Last reply Reply Quote 0
          • mikeudinM mikeudin referenced this topic on
          • First post
            Last post