Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
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.
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.
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.
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!