Changeset 10119 for trunk/src


Ignore:
Timestamp:
May 27, 2003, 11:46:30 AM (22 years ago)
Author:
sandervl
Message:

Do not send WM_STYLECHANGING/ED messages when the scrollbar control is shown or hidden.

Location:
trunk/src/user32
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/ctrlconf.h

    r9598 r10119  
    1 /* $Id: ctrlconf.h,v 1.2 2003-01-03 16:35:51 sandervl Exp $ */
     1/* $Id: ctrlconf.h,v 1.3 2003-05-27 09:46:30 sandervl Exp $ */
    22/*
    33 * Win32 common controls
     
    2121#define  WIN_SuspendWndsLock()          0
    2222#define  WIN_RestoreWndsLock(ipreviousLock)
     23
     24//Set the style of a window without sending WM_STYLECHANGING/ED messages
     25void WIN_SetStyle(HWND hwnd, DWORD dwStyle);
    2326
    2427//WIN31 look only -> we don't use it
  • trunk/src/user32/scroll.cpp

    r9994 r10119  
    1 /* $Id: scroll.cpp,v 1.49 2003-04-08 13:45:04 sandervl Exp $ */
     1/* $Id: scroll.cpp,v 1.50 2003-05-27 09:46:30 sandervl Exp $ */
    22/*
    33 * Scrollbar control
     
    1717#include <os2win.h>
    1818#include "controls.h"
     19#include "ctrlconf.h"
    1920#include "scroll.h"
    2021#include "win32wbase.h"
     
    16541655        {
    16551656            fShowH = !(dwStyle & WS_HSCROLL);
    1656             SetWindowLongA(hwnd, GWL_STYLE, dwStyle | WS_HSCROLL);
     1657            dwStyle |= WS_HSCROLL;
    16571658        }
    16581659        else  /* hide it */
    16591660        {
    16601661            fShowH = (dwStyle & WS_HSCROLL);
    1661             SetWindowLongA(hwnd, GWL_STYLE, dwStyle & ~WS_HSCROLL);
     1662            dwStyle &= ~WS_HSCROLL;
    16621663        }
    16631664        if( nBar == SB_HORZ )
     
    16721673        {
    16731674            fShowV = !(dwStyle & WS_VSCROLL);
    1674             SetWindowLongA(hwnd, GWL_STYLE, dwStyle | WS_VSCROLL);
     1675            dwStyle |= WS_VSCROLL;
    16751676        }
    16761677        else  /* hide it */
    16771678        {
    16781679            fShowV = (dwStyle & WS_VSCROLL);
    1679             SetWindowLongA(hwnd, GWL_STYLE, dwStyle & ~WS_VSCROLL);
     1680            dwStyle &= ~WS_VSCROLL;
    16801681        }
    16811682        if ( nBar == SB_VERT )
     
    16891690    if( fShowH || fShowV ) /* frame has been changed, let the window redraw itself */
    16901691    {
     1692        WIN_SetStyle( hwnd, dwStyle );
    16911693        SetWindowPos( hwnd, 0, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE
    16921694                    | SWP_NOACTIVATE | SWP_NOZORDER | SWP_FRAMECHANGED );
  • trunk/src/user32/win32wmisc.cpp

    r9598 r10119  
    1 /* $Id: win32wmisc.cpp,v 1.2 2003-01-03 16:35:57 sandervl Exp $ */
     1/* $Id: win32wmisc.cpp,v 1.3 2003-05-27 09:46:30 sandervl Exp $ */
    22/*
    33 * Misc. functions for window management
     
    2020#include <stdarg.h>
    2121#include <assert.h>
    22 #include <misc.h>
     22#include <dbglog.h>
    2323#include <win32wnd.h>
    2424#include <heapstring.h>
  • trunk/src/user32/windowword.cpp

    r7241 r10119  
    1 /* $Id: windowword.cpp,v 1.12 2001-10-28 10:38:14 sandervl Exp $ */
     1/* $Id: windowword.cpp,v 1.13 2003-05-27 09:46:30 sandervl Exp $ */
    22
    33/*
     
    1111 */
    1212#include <os2win.h>
    13 #include <misc.h>
     13#include <dbglog.h>
     14#include <ctrlconf.h>
    1415
    1516#include <win32wbase.h>
     
    1819#include "dbglocal.h"
    1920
     21//******************************************************************************
     22//Update the window style without sending WM_STYLECHANGING/ED
     23//******************************************************************************
     24void WIN_SetStyle(HWND hwnd, DWORD dwStyle)
     25{
     26 Win32BaseWindow *window;
     27
     28    window = Win32BaseWindow::GetWindowFromHandle(hwnd);
     29    if(window)
     30    {
     31        window->setStyle(dwStyle);
     32        RELEASE_WNDOBJ(window);
     33        return;
     34    }
     35    else {
     36        dprintf(("WIN_SetStyle window %x not found!", hwnd));
     37        return;
     38    }
     39}
    2040//******************************************************************************
    2141//******************************************************************************
Note: See TracChangeset for help on using the changeset viewer.