Ignore:
Timestamp:
Mar 25, 2001, 10:50:42 AM (24 years ago)
Author:
sandervl
Message:

hittest workaround for static controls + registerwindowmessage rewrite

File:
1 edited

Legend:

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

    r4800 r5373  
    1 /* $Id: static.cpp,v 1.21 2000-12-16 15:42:12 sandervl Exp $ */
     1/* $Id: static.cpp,v 1.22 2001-03-25 08:50:42 sandervl Exp $ */
    22/*
    33 * Static control
     
    411411LRESULT STATIC_NCHitTest(HWND hwnd,WPARAM wParam,LPARAM lParam)
    412412{
    413   return HTTRANSPARENT;
     413  DWORD dwStyle = GetWindowLongA(hwnd,GWL_STYLE);
     414  LRESULT lResult;
     415
     416  //SvL: If a static window has children, then we can't return HTTRANSPARENT
     417  //     here. For some reason PM then sends all mouse messages to the parent
     418  //     of the static window; even if they are intended for the children of
     419  //     the static window.
     420  //     TODO: This could break some win32 apps (parent not receiving mouse
     421  //           message for static window (non-child) area)
     422  if(GetWindow(hwnd, GW_HWNDFIRST) != 0) {
     423       return HTCLIENT;
     424  }
     425
     426  if (dwStyle & SS_NOTIFY)
     427       lResult = HTCLIENT;
     428  else lResult = HTTRANSPARENT;
     429
     430  return lResult;
    414431}
    415432
Note: See TracChangeset for help on using the changeset viewer.