Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python 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
    • Recent
    • Tags
    • Users
    • Login

    Trouble with SendMessage "conflict".

    Scheduled Pinned Locked Moved SDK Help
    13 Posts 0 Posters 930 Views
    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 Offline
      Helper
      last edited by

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

      On 06/05/2011 at 06:29, xxxxxxxx wrote:

      I don't think SendMessage will help in your case.

      What you probably can do is to send a custom message through SpecialEventAdd() from your thread. Then this message can be received in your dialog's overridden CoreMessage method.

      There is a small example in the docs for SpecialEventAdd().

      cheers,
      Matthias

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

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

        On 06/05/2011 at 07:51, xxxxxxxx wrote:

        Hi Matthias, thanks for your constants replies. I will try the SpecialEvent...I've already seen this method but I don't remember if I've already tested this solution. Tonight I try...this "problem" made me crazy...thanks again, I'll know if it works...

        bye

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

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

          On 06/05/2011 at 11:26, xxxxxxxx wrote:

          Definitively thanks, using SpecialEvent we can manipulate now the gedialog using threading context. Bye.

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

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

            On 06/05/2011 at 12:49, xxxxxxxx wrote:

            In any case, the SendMessage problem described stay...

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

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

              On 06/05/2011 at 13:30, xxxxxxxx wrote:

              Originally posted by xxxxxxxx

              In any case, the SendMessage problem described stay...

              And it will stay as long as you're calling the Windows-specific method (which you can't use in the context of Cinema's event system) instead of the GeDialog method...

              Best regards,

              Wilfried

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

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

                On 06/05/2011 at 13:41, xxxxxxxx wrote:

                Did I understand you right ? You want to to something in the dialog from another thread ?
                I don't know about C++, but maybe this helps you:

                When you want to send the message, don't send the message itself, instead create a variable the defines wether the message should be sent or not. Just some Pseudocode to clarify what I mean:

                  
                //Pseudocode, don't copy   
                class MyDialog extends GeDialog {   
                    boolean sendEvent = FALSE;   
                  
                    void Set_SendMessageOnNextUpdate() {   
                        sendEvent = TRUE;   
                    }   
                    void Do_SendMessage() {   
                        SendMessage();   
                        sendEvent = FALSE;   
                    }   
                    boolean CoreMessage(id,msg) {   
                        if (sendEvent) {   
                            Do_SendMessage();   
                        }   
                        return TRUE;   
                    }   
                }   
                  
                class MyThread extends Thread {   
                    void doMyStuff(GeDialog *dlg) {   
                        dlg.Set_SendMessageOnNextUpdate();   
                    }   
                }   
                

                I'm not sure if this will really work as you wish, but maybe it helps you 🙂

                Cheers,
                Niklas

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

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

                  On 07/05/2011 at 00:54, xxxxxxxx wrote:

                  Originally posted by xxxxxxxx

                  Originally posted by xxxxxxxx

                  In any case, the SendMessage problem described stay...

                  And it will stay as long as you're calling the Windows-specific method (which you can't use in the context of Cinema's event system) instead of the GeDialog method...

                  Best regards,

                  Wilfried

                  I don't call any windows specific method now...

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

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

                    On 07/05/2011 at 03:34, xxxxxxxx wrote:

                    Originally posted by xxxxxxxx

                    Originally posted by xxxxxxxx

                    Originally posted by xxxxxxxx

                    In any case, the SendMessage problem described stay...

                    And it will stay as long as you're calling the Windows-specific method (which you can't use in the context of Cinema's event system) instead of the GeDialog method...

                    Best regards,

                    Wilfried

                    I don't call any windows specific method now...
                    [/QUOTE]

                    You do. The compiler's error message proofs it.

                    Best regards,

                    Wilfried

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

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

                      On 07/05/2011 at 13:07, xxxxxxxx wrote:

                      Bho....If I do, I don't know where I do...I've removed all "trash" includes, I've only:

                      #include "c4d.h"
                      #include "c4d_gui.h"
                      #include "c4d_symbols.h"
                      #include "c4d_general.h"
                      #include "c4d_baseplugin.h"
                      #include "C4D_Thread.h"
                      #include <string>
                      #include <sys/stat.h>

                      I don't use any windows dependent method, the Thread is C4D Sdk based, but the message is:

                      error C2039: 'SendMessageA' : is not a member of 'C4DScenePlugin'

                      Now the prototype viewed with vs intellicode is correct but the error on define still stay...

                      Bho....

                      Originally posted by xxxxxxxx

                      Originally posted by xxxxxxxx

                      Originally posted by xxxxxxxx

                      Originally posted by xxxxxxxx

                      In any case, the SendMessage problem described stay...

                      And it will stay as long as you're calling the Windows-specific method (which you can't use in the context of Cinema's event system) instead of the GeDialog method...

                      Best regards,

                      Wilfried

                      I don't call any windows specific method now...
                      [/QUOTE]

                      You do. The compiler's error message proofs it.

                      Best regards,

                      Wilfried
                      [/QUOTE]

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

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

                        On 07/05/2011 at 13:26, xxxxxxxx wrote:

                        With a redefine of method name in my plugin now compile fine...very strange for me...

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