- m_buttonBitmap = bitmap;
- m_buttonBitmapOriginal = bitmap;
- m_buttonBitmapSelected = bitmap;
- m_buttonBitmapSelectedOriginal = bitmap;
-
- SetName(name);
- SetValidator(validator);
- parent->AddChild(this);
-
- m_backgroundColour = parent->GetBackgroundColour() ;
- m_foregroundColour = parent->GetForegroundColour() ;
- m_windowStyle = style;
- m_marginX = 0;
- m_marginY = 0;
-
- /*
- int x = pos.x;
- int y = pos.y;
- int width = size.x;
- int height = size.y;
- */
+ if( !CreateControl( parent, id, pos, size, style, validator, name ) )
+ return false;
+ PreCreation();