Re: Combo surrounding rectangle
- Posted by Pete Lomax <petelomax at blueyonder.co.uk> Apr 08, 2005
- 472 views
On Fri, 08 Apr 2005 06:01:14 -0700, Al Getz <guest at RapidEuphoria.com> wrote: >Hi there Pete, > >Did you try OR'ing the creation flag with CBS_NOINTEGRALHEIGHT (when >creating the combo box) to see if it 'corrects' the problem? It makes no difference. In fact, I deliberately chose the height 208 to avoid that issue (207 made it one whole line smaller). >A guess is that the box will change heights on different systems >(and with diff fonts and font sizes) so you'll have to account for >that unless you include that flag. I am asking windows, via GetWindowRect in user32.dll, for the size. Windows should know it, pixel-perfect, since it drew it, but it tells me lies, which is what I queried. > >Try adding that flag and see if it helps. This could become a problem >with list boxes too -- i'd double check that also. Listboxes are fine both with and without that flag. I suspect Mike is right and it is a glitch in user32.dll, so the simple fudge I presented may indeed be the correct thing to do. I think I'll proceed on that assumption. Regards, Pete