> M> The problem I find is that when DoGetBestSize() is called the first
> M> time, Windows returns wrong values for the size of the control.
>
> Is it really Windows? I think DoGetBestSize() returns minimal size simply
> because there are no items in the control yet.
I see this wrong values using COMBOBOXINFO inside DoGetSizeFromTextSize().
> M> I suggest removing SetInitialSize() from wxControl::MSWCreateControl(),
> M> and keeping each call from derived controls.
>
> The trouble is that some other classes don't call SetInitialSize() (e.g.
> wxStaticLine to give a trivial example), so just removing it would break
> things. So unless the current code has some more serious problems than
> "just" unnecessarily repositioning the control twice (which is, to be fair,
> bad enough) I'd prefer to not touch it. Otherwise we'd need to review all
> code calling MSWCreateControl() and add SetInitialSize() calls if
> necessary.
The only problem I've noticed is the one you've said.
TIA
Manolo