General question [SOLVED]



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

    On 19/04/2003 at 12:26, xxxxxxxx wrote:

    User Information:
    ResEdit Version:   R8

    ---------
    I use a lot the ReEdit, but it some case I get Error in it when I open
    The typical exemple is the Color C4D object

    To show all stuff in it, I have to say OEPN , ok ois save and work fine
    But when I ReOpen the Dialog in the reEdit it show an error , I have to go in the code to remove the OPEN;
    Also I try to use HTe links Object and try to make some change
    TO acpet or exclude stuff in it. There aloso is a problem.

    Just for you to Know I use all that in a standard GeDialog overLoad Class
    Niki



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

    On 20/04/2003 at 01:47, xxxxxxxx wrote:

    Hi
    > But when I ReOpen the Dialog in the reEdit it show an error , I have to go in the code to remove the OPEN;
    This was a bug. Thanks. You may use the normal color chooser (instead of the custom GUI).
    > Also I try to use HTe links Object and try to make some change
    > TO acpet or exclude stuff in it. There aloso is a problem.
    >
    Currently you can't change the accepted / refused objects in ResEdit. You can modify the accepted objects in your dialog GeDialog::Command function. The container elements are:

        
        
        #define LINKBOX_ACCEPT_MESSAGE_TYPE         1       // LONG  - the type of the item dragged in the link box  
        #define LINKBOX_ACCEPT_MESSAGE_ELEMENT      2       // a pointer (BaseList2D* ) to the object cast to LONG  
        #define LINKBOX_ACCEPT_MESSAGE_ACCEPT       3       // a pointer to a Bool, cast to long (set this value to TRUE, if you want to accept the object)  
        #define LINKBOX_ACCEPT_MESSAGE_CONTROL_ID   4       // the ID of the control that sent the message  
        
    


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

    On 20/04/2003 at 04:20, xxxxxxxx wrote:

    Thanks

    It start to come :)

    Bit I thinks I Miss one part there... I'm New in thois SDK, I know C++ but not much the C4D SDK.

    So at the base in the dialog I set it that way

    class AmaToolsDialog : public GeDialog
    {
         private:
              ...
              
              Filename MatFileToScan;
         
              bool ValidePoserFile;
                        
              BaseLink *FigureLink;
              BaseLink *MatToCopyLink;
              BaseLink *MatMatToolsLink;

    LONG count;

    public:
              ...

    };

    but now in the GeDialog::command
    I never see those LINKBOX_ACCEPT_MESSAGE_TYPE, etc...
    I look in your code an I see a "LinkBoxGui" where it show those messages etc...

    But how to Construct this LinkBoxGui ?

    any it work now, but can test the Accept etc. and also can't show the Link when I reopen my dialog :(

    Well is not that important, so take your time and pass good Holidays

    Niki



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

    On 20/04/2003 at 08:07, xxxxxxxx wrote:

    Hi Niki
    > I never see those LINKBOX_ACCEPT_MESSAGE_TYPE, etc...
    Your Message function should be called as soon as the user drags an item over the link box. Sorry, I was wrong in my previous post. It's the message function. The Container ID is MSG_DESCRIPTION_CHECKDRAGANDDROP.
    I have just tested and it works:

        
        
          
        LONG YourDialogClass::Message(const BaseContainer &msg, BaseContainer &result)  
        {  
          if (msg.GetId() == MSG_DESCRIPTION_CHECKDRAGANDDROP)  
          {  
            LONG item_type = msg.GetLong(LINKBOX_ACCEPT_MESSAGE_TYPE);  
            BaseList2D* obj = (BaseList2D* )msg.GetLong(LINKBOX_ACCEPT_MESSAGE_ELEMENT);  
            Bool *accept = (Bool* )msg.GetLong(LINKBOX_ACCEPT_MESSAGE_ACCEPT);  
            LONG linkbox_id = msg.GetLong(LINKBOX_ACCEPT_MESSAGE_CONTROL_ID);  
            // set *accept TRUE, if the object should be accepted, FALSE otherwise.  
          }  
          return SubDialog::Message(msg, result);  
        }  
        
    

    > But how to Construct this LinkBoxGui ?
    You don't need to construct it. It's done when the dialog is created. You can find the pointer with GeDialog::FindCustomGui.
    > any it work now, but can test the Accept etc. and also can't show the Link when I reopen my dialog :(
    Use LinkBoxGui::SetLink in InitValues.
    > Well is not that important, so take your time and pass good Holidays
    :-)
    Happy Coding :-))



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

    On 20/04/2003 at 09:30, xxxxxxxx wrote:

    Thanks You verry much ! It work Now :)

    if (msg.GetId() == MSG_DESCRIPTION_CHECKDRAGANDDROP)
         {
              //LONG item_type = msg.GetLong(LINKBOX_ACCEPT_MESSAGE_TYPE);
              BaseList2D* obj = (BaseList2D* )msg.GetLong(LINKBOX_ACCEPT_MESSAGE_ELEMENT);
              Bool *accept = (Bool* )msg.GetLong(LINKBOX_ACCEPT_MESSAGE_ACCEPT);
              LONG linkbox_id = msg.GetLong(LINKBOX_ACCEPT_MESSAGE_CONTROL_ID);
              if(linkbox_id == IDC_FIGURE_LINK) {
                   if(!obj->IsInstanceOf(Opolygon))
                        *accept = false;
              }
              if((linkbox_id == IDC_MATTOCOPY) || (linkbox_id == IDC_MATTOOL_MATLINK)) {
                   if(!obj->IsInstanceOf(Ttexture) && !obj->IsInstanceOf(Mmaterial))
                        *accept = false;
              }
              // set *accept TRUE, if the object should be accepted, FALSE otherwise.
              
         }

    return GeDialog::Message(msg,result);

    I will have others stupid questions but I let you pass the holidays now...

    Niki


Log in to reply