Icons in dialog menus



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

    On 21/02/2011 at 08:23, xxxxxxxx wrote:

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

    ---------
    I don't know if it's possible to do this, but what I'd like to do is add icons to the menus in my GeDialog. Looking at the object manager for example, the menu entries there have icons, but these menu entries are C4D commands. Adding a C4D command to my menus will add the relevant icon, but how do (or can I) do this for my own menu entries? I normally add these with MenuAddString(), but there's no apparent way to add an icon.

    There's also the function MenuSetResource() in gui.h, which sounds as if it might do the trick, but there's no documentation on this or on what a menu resource might be.

    The other interesting thing I noticed is that, adding a C4D command to a dialog menu with MenuAddCommand() automatically makes the menu into a tear-off palette, which they otherwise aren't. Is it possible to make a menu into a tear-off, without adding an internal command?

    Thanks,

    Steve



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

    On 23/02/2011 at 08:12, xxxxxxxx wrote:

    So just to bump this, does anyone know if either of these things are possible?



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

    On 27/02/2011 at 21:21, xxxxxxxx wrote:

    Not sure if it's correct or not, but have a look at the way icons are added in the sdk gradient shader example - maybe something like that works.

    Again, I have no idea if this would work or not - it's just something I saw for the first time recently.



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

    On 28/02/2011 at 01:21, xxxxxxxx wrote:

    That's kind of neat, I hadn't seen that before. I'll take a look at the code, many thanks!



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

    On 01/03/2011 at 03:49, xxxxxxxx wrote:

    I'm not sure if this even works for dialogs. In case of the gradient shader example it's a feature of the CYCLE integer interface element.

    The icon ID is passed along prefixed by a tilde:

      
    CYCLE  
    {  
      SDKGRADIENTSHADER_MODE_U~200000135;  
      SDKGRADIENTSHADER_MODE_V~200000136;  
      SDKGRADIENTSHADER_MODE_DIAGONAL~200000137;  
      SDKGRADIENTSHADER_MODE_RADIAL~200000138;  
      SDKGRADIENTSHADER_MODE_CIRCULAR~200000139;  
      SDKGRADIENTSHADER_MODE_BOX~200000140;  
      SDKGRADIENTSHADER_MODE_STAR~200000141;  
      SDKGRADIENTSHADER_MODE_CORNER~200000142;  
    }  
    

    cheers,
    Matthias



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

    On 01/03/2011 at 05:56, xxxxxxxx wrote:

    Yes, I had a look at this and I can't see how it would work unless it's possible to load a menu resource. At the moment I create menus for my dialogs manually, using MenuAddString() etc. in code. If it was possible to load a resource file containing a menu structure, maybe it would work, but I can't see how that is done, or even if it can be.


Log in to reply