[BLACKBOX] /NOSCROLL and Wine

From: (wrong string) Антон Π”ΠΌΠΈΡ‚Ρ€ΠΈΠ΅Π² <adimetrius{([at]})nowhere.xy>
Date: Tue, 12 May 2009 09:50:44 +0400

----boundary-LibPST-iamunique-446037842_-_-
Content-type: text/plain

Hi all,

i am using BB under wine, and the /NOSCROLL command line option didn't work for me: i would always get scroll bars when a window was moved beyond main client area. Under Windows, this was not the case: the /NOSCROLL works just fine.

Recently i found a bug fix for Wine that solves the problem. It's discussion can be found here:
http://bugs.winehq.org/show_bug.cgi?id=9453

For convenience, i will post the patch itself at the end of this email.

To apply it, you will need wine source code, of course, then apply the patch file to mdi.c in the source tree (unless in your version it is already included), then:
IF you haven't built wine before THEN
   build wine with "make && make install" or following insructions in README
ELSIF you have the file mdi.o (* from a previous build *) THEN
   remove or rename mdi.o
   from wine source root run "make".
        (* this will make a new version of user32.dll.so in the source tree *)
   locate "user32.dll.so" in your local filesystem
   replace the "user32.dll.so" in your local filesystem with the newly make'd
user32.dll.so"
END

Restart BB and enjoy!

Here is the patch:
----------------------------------------------------
Index: mdi.c
===================================================================
--- mdi.c (revision 12767)
+++ mdi.c (arbetskopia)
{([at]})nowhere.xy
     UINT nTotalCreated;
     UINT mdiFlags;
     UINT sbRecalc; /* SB_xxx flags for scrollbar fixup */
+ DWORD initialStyle; /* Style when window was created */
 } MDICLIENTINFO;
 
 static HBITMAP hBmpClose = 0;
{([at]})nowhere.xy
         ci->nTotalCreated = 0;
         ci->frameTitle = NULL;
         ci->mdiFlags = 0;
+ ci->initialStyle = cs->style;
         ci->hFrameMenu = GetMenu(cs->hwndParent);
 
         if (!hBmpClose) hBmpClose = CreateMDIMenuBitmap();
{([at]})nowhere.xy
     SCROLLINFO info;
     RECT childRect, clientRect;
     HWND *list;
+ MDICLIENTINFO *ci;
 
+ ci = get_client_info(hwnd);
     GetClientRect( hwnd, &clientRect );
     SetRectEmpty( &childRect );
 
{([at]})nowhere.xy
                         info.nMin = childRect.left;
                         info.nMax = childRect.right - clientRect.right;
                         info.nPos = clientRect.left - childRect.left;
- SetScrollInfo(hwnd, SB_HORZ, &info, TRUE);
+ if (ci->initialStyle & WS_HSCROLL)
+ SetScrollInfo(hwnd, SB_HORZ, &info, TRUE);
                         if (scroll == SB_HORZ) break;
                         /* fall through */
         case SB_VERT:
                         info.nMin = childRect.top;
                         info.nMax = childRect.bottom - clientRect.bottom;
                         info.nPos = clientRect.top - childRect.top;
- SetScrollInfo(hwnd, SB_VERT, &info, TRUE);
+ if (ci->initialStyle & WS_VSCROLL)
+ SetScrollInfo(hwnd, SB_VERT, &info, TRUE);
                         break;
     }
 }


----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-446037842_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIwIEhpIGFsbCxccGFyDQpccGFyDQppIGFtIHVzaW5n
IEJCIHVuZGVyIHdpbmUsIGFuZCB0aGUgL05PU0NST0xMIGNvbW1hbmQgbGluZSBvcHRpb24gZGlk
bid0IHdvcmsgZm9yIG1lOiBpIHdvdWxkIGFsd2F5cyBnZXQgc2Nyb2xsIGJhcnMgd2hlbiBhIHdp
bmRvdyB3YXMgbW92ZWQgYmV5b25kIG1haW4gY2xpZW50IGFyZWEu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ZHkgIlNJR05PRkYgQkxBQ0tCT1giIHRv
IExJU1RTRVJWQExJU1RTLk9CRVJPTi5DSH19AGElkTA=
----boundary-LibPST-iamunique-446037842_-_---
Received on Tue May 12 2009 - 07:50:44 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:30:47 UTC