Ignore:
Timestamp:
Apr 11, 2003, 5:45:13 PM (22 years ago)
Author:
sandervl
Message:

Changed default hittest handler to check for WS_EX_TOOLWINDOW (system menu & min/max buttons)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/win32wbasenonclient.cpp

    r10013 r10015  
    1 /* $Id: win32wbasenonclient.cpp,v 1.51 2003-04-11 15:22:34 sandervl Exp $ */
     1/* $Id: win32wbasenonclient.cpp,v 1.52 2003-04-11 15:45:13 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2 (non-client methods)
     
    530530    {
    531531      /* Check system menu */
    532       if(dwStyle & WS_SYSMENU)
     532      if ((dwStyle & WS_SYSMENU) && !(dwExStyle & WS_EX_TOOLWINDOW))
    533533      {
    534534        /* Check if there is an user icon */
     
    550550      /* Check maximize box */
    551551      /* In win95 there is automatically a Maximize button when there is a minimize one*/
    552       if ((dwStyle & WS_MAXIMIZEBOX)|| (dwStyle & WS_MINIMIZEBOX))
     552      //Testing in NT4 shows that tool windows never have a minimize or maximize button!
     553      if (((dwStyle & WS_MAXIMIZEBOX) || (dwStyle & WS_MINIMIZEBOX)) &&
     554          !(dwExStyle & WS_EX_TOOLWINDOW))
    553555          rect.right -= GetSystemMetrics(SM_CXSIZE) + 1;
    554556      if (pt.x > rect.right) return HTMAXBUTTON;
     
    556558      /* Check minimize box */
    557559      /* In win95 there is automatically a Maximize button when there is a Maximize one*/
    558       if ((dwStyle & WS_MINIMIZEBOX)||(dwStyle & WS_MAXIMIZEBOX))
     560      //Testing in NT4 shows that tool windows never have a minimize or maximize button!
     561      if (((dwStyle & WS_MINIMIZEBOX) || (dwStyle & WS_MAXIMIZEBOX)) &&
     562          !(dwExStyle & WS_EX_TOOLWINDOW))
    559563          rect.right -= GetSystemMetrics(SM_CXSIZE) + 1;
    560564
Note: See TracChangeset for help on using the changeset viewer.