Hello all,
another puzzling problem with windows (or, hopefully, with me ;-)
I want to display a 512x512 bitmap in a subwindow with scrollers
(both horizontal and vertical), but I want to make the window
originally exactly the size of the bitmap (no white areas around, no
scrollers initially). So I calculate:
addx = 2*GetSystemMetrics(SM_CXFRAME);
addy = 2*GetSystemMetrics(SM_CYFRAME)+GetSystemMetrics(SM_CYCAPTION);
and when I call SetupWindow, I call
MoveWindow(HWindow,0,0,512+addx,512+addy,False).
Well, it does not work. Making calls to GetWindowRect() before and after
the call, and playing with the size of the window, I discovered that
the sizes should be x:512+8, y:512+8+20, and they can display the image
as I want when the values returned by GetWindowRect correspond to the above.
The problem is, when I set them with MoveWindow, an horrible white bar
appears on the bottom of the window, and I suspect that it is corresponding to
the height of the scrollbar.
Questions: Why does it appears only on the horizontal ?
What can i do to avoid it and make it appear as just size, with the scroll
bars ONLY if I have the need to reduce the size of the window ?
The window style is WS_OVERLAPPED|WS_SYSMENU|WS_VISIBLE|WS_VSCROLL|WS_HSCROLL.
Thanks very much in advance,
Rafael.
--
---------------------------------------------------------------------------
There's an extremely small but nonzero chance that, through a process known as
'tunneling', this message may spontaneously disappear from its present location
and reappear at any random place in the Universe, including newsgroups and your
private mail. I am not responsible for any inconvenience that may result.