Link in GeDialog



  • On 11/04/2013 at 07:55, xxxxxxxx wrote:

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

    ---------
    Hello,
    i have a some trouble with a LINK in a GeDialog.
    In my res file, it looks like this:
    ...
    LINK IDC_CUSTOM1
    {
    ALIGN_TOP; SCALE_H;
    }
    ..
     
    and I get the link in the message function of in the command function of GeDialog.
    ..
    case IDC_CUSTOM1:
    BaseList2D* m_blink = msg.GetLink( BFM_ACTION_VALUE, GetActiveDocument() );
    ...
     
    Now my problem, how can I set a link into this field? a SetLink() function for gadgets doesn't exist.
     
    regards
    Marky



  • On 11/04/2013 at 08:21, xxxxxxxx wrote:

    Hi,

    You can get/set a link retrieving the custom GUI gadget with FindCustomGui() first:

    LinkBoxGui* linkbox = (LinkBoxGui* )FindCustomGui(IDC_LINK, CUSTOMGUI_LINKBOX);
    if (linkbox==NULL) return FALSE;
      
    BaseList2D bl = linkbox->GetLink(doc);
    ...
    linkbox->SetLink(bl);
    

    See LayerShaderBrowser in the SDK examples.
    This CommandData example uses a LINK in its dialog.



  • On 11/04/2013 at 21:50, xxxxxxxx wrote:

    Oh, so easy. Thanks a lot, it's working.
    I have totally forgotten to look into the sdk examples.


Log in to reply