This is a snippet if I create a simple test project with a frame containing a boxsizer and syet the frames size to a fixed size:
[...]
Create(parent, id, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_STYLE, _T("id"));
SetClientSize(wxSize(450,150));
BoxSizer1 = new wxBoxSizer(wxHORIZONTAL);
SetSizer(BoxSizer1);
[...]
BoxSizer1->SetSizeHints(this);
[...]
And I don't see what is wrong.
It works and it does more or less exactly what the wxWidgets docu suggests to do with a (box)sizer (according to the sizer overview.
Maybe I am wrong, but I don't know why it should be done the other way.
Loaden:
could you please explain what is wrong doing it this way and/or point me to the part of the wxWidgets documentation that describes why it should be done this way ?