Question to LinkBox

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

On 12/03/2009 at 07:58, xxxxxxxx wrote:

User Information:
Cinema 4D Version:   R10 
Platform:   Windows  ;   
Language(s) :   C.O.F.F.E.E  ;

---------
I was using StaticText as Drag&Drop; gadgets in my Dialog.
To reach a better layout I added a *.res file to my CreateLayout().

> \> DIALOG IDD_DIALOG1 \> { NAME IDS_DIALOG; CENTER_V; CENTER_H; \> \> LINK 900 \> { \>     ALIGN_TOP; ALIGN_LEFT; SIZE 300, 0; \> } } \>

I tried the same Code I used before with StaticText.

> \> if(msg->GetId() == BFM_DRAGRECEIVE) \>       { \>           if(CheckDropArea(900, msg, TRUE, TRUE)) { \>                SetDragDestination(MOUSE_POINT_HAND); \>                if(msg->GetData(BFM_DRAG_FINISHED)) { \>                     object = GetDragObject(msg); \>                     SetString(900, object->GetName()); \>

The problem is, when dropping a object in the LinkBox it disappears. I receive the object in the "var object" and can work with it but it isnt shown in the LinkBox. So SetString isnt working any longer. What do i have to use instead of it?

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

On 12/03/2009 at 08:08, xxxxxxxx wrote:

You can not simply use

> \> LINK 900 \> { \> } \>

You have to give it an ID and define it in the 'c4d_symbols.h' header file.

> \> LINK MY_LINK_ID \> { \> } \>

> \> enum \> { \> ... \>      MY_LINK_ID, \> ... \> }

cheers,
Matthias

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

On 12/03/2009 at 08:39, xxxxxxxx wrote:

thank u. I thought I could use 900 as ID.
Well I corrected the files, but still have the same problem...

c4d_symbols.h

> \> enum \> { \> \_FIRST_ELEMENT\_      = 10000, \> // Dialog definitions of IDD_DIALOG1 start here \> IDD_DIALOG1, \> MY_LINK_ID1, \> // Dialog definitions of IDD_DIALOG1 end here \> // End of symbol definition \> \_DUMMY_ELEMENT\_ \> }; \>

IDD_DIALOG1.res

> \> // C4D-DialogResource \> DIALOG IDD_DIALOG1 \> { \> NAME IDS_DIALOG; CENTER_V; CENTER_H; \> \> LINK MY_LINK_ID1 \> { \>     ALIGN_TOP; ALIGN_LEFT; SIZE 300, 0; \> } \> } \>

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

On 16/03/2009 at 02:37, xxxxxxxx wrote:

still have no idea how to make the dropped object visible!
Hope someone could help me go on.

Thanks in advance

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

On 16/03/2009 at 04:39, xxxxxxxx wrote:

Here is a complete plugin with source code and resource files of a dialog with link field:

GUI Demo

cheers,
Matthias

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

On 16/03/2009 at 04:53, xxxxxxxx wrote:

Thank you so much Matthias!

I already had the same Code but forget to delete a "return TRUE;" at the end of my Message Funktion.
Because of that the dropped object wasn't displayed in the
Link field.

without this line everythink works perfect now.

Thank you again !!!!

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

On 17/03/2009 at 08:42, xxxxxxxx wrote:

one more:

There is no way to predefine a Linkbox with an object in COFFEE? I remember to have read something like that in an older post.

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

On 17/03/2009 at 08:44, xxxxxxxx wrote:

I don't think this is possible for dialogs. It is possible for descriptions.

cheers,
Matthias