On 28/08/2018 at 01:33, xxxxxxxx wrote:
Cinema 4D Version: R18
Platform: Windows ;
Language(s) : C++ ;
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 ?
On 29/08/2018 at 00:44, xxxxxxxx wrote:
maybe take a look at the GetItemDim() function. You could call it on your parent dialog group - might get what you're after?
On 29/08/2018 at 04:48, xxxxxxxx wrote:
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.
On 30/08/2018 at 09:05, xxxxxxxx wrote:
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)
Int32 w = msg.GetInt32(BFM_ADJUSTSIZE_WIDTH);
Int32 h = msg.GetInt32(BFM_ADJUSTSIZE_HEIGHT);
return GeDialog::Message(msg, result);
If you have any questions, please let me know.