At 03:05 PM 7/26/00 +0200, you wrote:
>The change by Stephane Lussier on 2000-06-07 broke my favorite 16bit
>application, Stars!. The problem is that after the change that
>
> Height of the listbox should be adjust when LBS_OWNERDRAWFIXED is set
> and not if LBS_OWNERDRAWVARIABLE is set, previously it was not
> adjusting the size in both cases.
>
>one listbox in the application keeps resizing itself. One solution would
>be to revert this part of the patch. But this change makes sense to
>me, and it is probably needed elsewhere, so maybe there is something
>broken elsewhere. I don't have a good understanding of how the resizing
>of the listbox should work, and how SetWindowPos interacts with the
>various other parts, but perhaps somebody else has an idea?
<snip trace>
This is exactly this change that breaks it ?
@@ -343,7 +343,7 @@
GetClientRect( wnd->hwndSelf, &rect );
descr->width = rect.right - rect.left;
descr->height = rect.bottom - rect.top;
- if (!(descr->style & LBS_NOINTEGRALHEIGHT) && !IS_OWNERDRAW(descr))
+ if (!(descr->style & LBS_NOINTEGRALHEIGHT) && !(descr->style &
+LBS_OWNERDRAWVARIABLE))
{
if ((descr->height > descr->item_height) &&
(descr->height % descr->item_height))
I checked it and it seems fine :-(
Could you try the following patch :
--- winpos.c.orig Wed Jul 26 08:23:14 2000
+++ winpos.c Wed Jul 26 22:16:58 2000
@@ -2060,6 +2060,8 @@
LONG WINPOS_HandleWindowPosChanging16( WND *wndPtr, WINDOWPOS16 *winpos )
{
POINT maxSize, minTrack;
+ TRACE("newpos=%d-%d size=%d-%d flags=%x\n",winpos->x,winpos->y,
+ winpos->cx,winpos->cy,winpos->flags);
if (winpos->flags & SWP_NOSIZE) return 0;
if ((wndPtr->dwStyle & WS_THICKFRAME) ||
((wndPtr->dwStyle & (WS_POPUP | WS_CHILD)) == 0))
@@ -2085,6 +2087,8 @@
LONG WINPOS_HandleWindowPosChanging( WND *wndPtr, WINDOWPOS *winpos )
{
POINT maxSize;
+ TRACE("newpos=%d-%d size=%d-%d flags=%x\n",winpos->x,winpos->y,
+ winpos->cx,winpos->cy,winpos->flags);
if (winpos->flags & SWP_NOSIZE) return 0;
if ((wndPtr->dwStyle & WS_THICKFRAME) ||
((wndPtr->dwStyle & (WS_POPUP | WS_CHILD)) == 0))
And rerun with debugmsg +win,+relay,+listbox and send the result
to me (I am not sure it's a good idea to send another trace to the list as most
people are not interested by this problem)
And if your app is freely available for download, give me the Url too, I have
always wanted to play Stars :-)
Gerard