DLG_TYPE



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

    On 16/03/2011 at 16:11, xxxxxxxx wrote:

    but sorry why can be a problem to hide menu bar ?... is this not only a kind of layout issue ?

    sorry for question only to understand

    all the best
    Franz



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

    On 17/03/2011 at 08:54, xxxxxxxx wrote:

    Hiding the menu bar requires some internal tricks which are not suitable for plugins.

    cheers,
    Matthias



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

    On 19/03/2011 at 11:25, xxxxxxxx wrote:

    sorry for late reply ... thanks ok :)
    Franz



  • On 22/04/2013 at 05:04, xxxxxxxx wrote:

    Is there really no equivalent to DLG_NOMENUBAR in the C++ SDK? If not are those internal tricks somehow applicable for us?
    I am trying to create a non-modal dialog for an about-box which should neither be resizable nor have a menu bar.



  • On 22/04/2013 at 05:10, xxxxxxxx wrote:

    Hi Satara,

    have you tried to add

    AddGadget(DLG_NOMENUBAR);
    

    in the constructor of your dialog? This is at least the way it works in Python, didn't yet need to
    use it in C++. This call does not work in CreateLayout().

    Best,
    -Niklas



  • On 22/04/2013 at 06:25, xxxxxxxx wrote:

    Unfortunately DLG_NOMENUBAR is not defined in C++ :\
    Also I couldn't find AddGadget in the documents. What's that function supposed to do? It also seems not to be available in the SDK.



  • On 22/04/2013 at 06:37, xxxxxxxx wrote:

    Hi Satara,

    I see, I was wrong back then and reused it in my current answer. The correct name of the constant
    is DIALOG_NOMENUBAR. Is it still undefined?

    There is not documentation for the AddGadget method, but it sure is there. As far as I can tell, this
    is called internally from the AddEditText() (and etc.) methods. But it's just a wild guess.

    Best,
    -Niklas



  • On 22/04/2013 at 09:31, xxxxxxxx wrote:

    Do you have a working example of that working in Python Niklas?
    The reason I ask is because I've got a couple of old Python example that uses that kind of code. But they don't remove the menu bar in R13.

    I'm wondering if Maxon has changed the SDK so this code no longer works anymore?

    -ScottA



  • On 22/04/2013 at 09:35, xxxxxxxx wrote:

    Hi Scott,

    my QuickDocs plugin uses it, the Py-MemoryViewer example in the SDK documentation uses it. Or
    try this:

      
    import os
    import c4d
      
    class Dialog(c4d.gui.GeDialog) :
      
        def __init__(self) :
            super(Dialog, self).__init__()
            self.AddGadget(c4d.DIALOG_NOMENUBAR, 0)
      
        def CreateLayout(self) :
            self.AddStaticText(0, 0, name="Hello!")
            return True
      
    def main() :
        dlg = Dialog()
      
        # Do NOT !! do this in production. Seriously. Just don't.
        os._crazy_dialog_identifier_saved_in_os_so_it_persists_  = dlg
        # Again, DON'T DO IT! You've never seen this line, did you? NO? Great.
      
        dlg.Open(c4d.DLG_TYPE_ASYNC)
      
    main()
    

    -Niklas



  • On 22/04/2013 at 09:58, xxxxxxxx wrote:

    Thanks.
    I think I'm mixing up the terms.
    I think I confused the "title bar" with the "menu bar".

    I have this old C++ code that someone posted long ago that's supposed to remove the menu bar:

    //The constructor  
    MyDialog::MyDialog(void)  
    {  
      C4DOS.Cd->AddGadget(Get(),DIALOG_NOMENUBAR,0,NULL,0,0,0,0,NULL,NULL);   //Removes the menu bar  
    }
    

    Not sure if that helps or not.

    -ScottA



  • On 22/04/2013 at 11:53, xxxxxxxx wrote:

    Thanks a lot to both of you. Got it working now :)


Log in to reply