News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

This is for anyone who makes a new dialog box in C::B

Started by 280Z28, December 15, 2005, 06:34:21 AM

Previous topic - Next topic

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.


PositionUserDialog(this);


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.next.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
78 280Z, "a few bolt-ons" - 12.71@109.04
99 Trans Am, "Daily Driver" - 525rwhp/475rwtq
Check out The Sam Zone :cool:

David Perfors

Why not use this->CenterOnParent()? It is nicer when you don't use C::B maximized... ;)
OS: winXP
Compiler: mingw
IDE: Code::Blocks SVN WX: 2.8.4 Wish list: faster code completion, easier debugging, refactoring

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... ;)

They do exactly the same thing with the exception of dialogs that don't have a parent.
78 280Z, "a few bolt-ons" - 12.71@109.04
99 Trans Am, "Daily Driver" - 525rwhp/475rwtq
Check out The Sam Zone :cool:

280Z28

Please read the first post again. It has been changed based on the discussion between thomas and I. :)
78 280Z, "a few bolt-ons" - 12.71@109.04
99 Trans Am, "Daily Driver" - 525rwhp/475rwtq
Check out The Sam Zone :cool: