Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Register
    • Login

    Dialog size

    SDK Help
    0
    4
    1.1k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Helper
      last edited by

      On 28/08/2018 at 01:33, xxxxxxxx wrote:

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

      ---------
      Hello.

      I have a resizable dialog and I need to know its width and height. 
      Is there a way to do it in Message method listening to BFM_SIZED ?
      In general, how else can I know its size ?

      Thank you.
      Petros.

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        On 29/08/2018 at 00:44, xxxxxxxx wrote:

        Hi Petros,

        maybe take a look at the GetItemDim() function. You could call it on your parent dialog group - might get what you're after?

        WP.

        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

          On 29/08/2018 at 04:48, xxxxxxxx wrote:

          Hello.

          GetItemDim() works fine ! It returns the size of the requested ID.
          There is another problem though if used in Message listening to BFM_SIZED.
          If I double click the Dialog's Title bar causing the dialog to be maximized, it returns the previous width (not the maximized one).
          So it appears that BFM_SIZED is not the right message to use in order to retrieve the correct Param width. I need the size after the resizing.

          Thank you.

          1 Reply Last reply Reply Quote 0
          • H
            Helper
            last edited by

            On 30/08/2018 at 09:05, xxxxxxxx wrote:

            Hi Peterakos,

            Sorry for the delay, even if it's marked as private you can use BFM_ADJUSTSIZE as bellow to know the current size of the windows.

            Int32 YourGeDialog::Message(const BaseContainer& msg, BaseContainer& result)
            {
            	switch (msg.GetId())
            	{
            		case BFM_ADJUSTSIZE:
            			{
            				Int32 w = msg.GetInt32(BFM_ADJUSTSIZE_WIDTH);
            				Int32 h = msg.GetInt32(BFM_ADJUSTSIZE_HEIGHT);
            				break;
            			}
            	}
            	return GeDialog::Message(msg, result);
            }
            

            If you have any questions, please let me know.
            Cheers,
            Maxime!

            1 Reply Last reply Reply Quote 0
            • First post
              Last post