Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
This is for anyone who makes a new dialog box in C::B
(1/1)
280Z28:
In the dialog class contructor, after calling LoadDialog() you should call this function. I placed the call right before returning from the constructor where possible for consistency.
--- Code: ---PositionUserDialog(this);
--- End code ---
This will position the dialog where the user has requested it be placed. PositionUserDialog is declared in <sdk/xtra_classes.h>, or you can just include <sdk/sdk.h>
The full discussion leading to this decision is here:
http://forums.codeblocks.org/index.php?topic=1640.0
I fixed all the existing cases and posted a patch but it is up to you to add this line if you make a new dialog from here on out. :)
8)
Sam
David Perfors:
Why not use this->CenterOnParent()? It is nicer when you don't use C::B maximized... ;)
280Z28:
--- Quote from: mispunt on December 15, 2005, 05:27:49 pm ---Why not use this->CenterOnParent()? It is nicer when you don't use C::B maximized... ;)
--- End quote ---
They do exactly the same thing with the exception of dialogs that don't have a parent.
280Z28:
Please read the first post again. It has been changed based on the discussion between thomas and I. :)
Navigation
[0] Message Index
Go to full version