Changeset 5373 for trunk/src


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

hittest workaround for static controls + registerwindowmessage rewrite

Location:
trunk/src/user32
Files:
4 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
  • trunk/src/user32/win32dlg.cpp

    r5173 r5373  
    1 /* $Id: win32dlg.cpp,v 1.57 2001-02-18 17:59:05 sandervl Exp $ */
     1/* $Id: win32dlg.cpp,v 1.58 2001-03-25 08:50:42 sandervl Exp $ */
    22/*
    33 * Win32 Dialog Code for OS/2
     
    288288  INT retval;
    289289
     290    dprintf(("doDialogBox %x", getWindowHandle()));
    290291    /* Owner must be a top-level window */
    291292    if(getOwner() == NULL) {
  • trunk/src/user32/win32wbase.cpp

    r5258 r5373  
    1 /* $Id: win32wbase.cpp,v 1.244 2001-02-23 14:52:41 sandervl Exp $ */
     1/* $Id: win32wbase.cpp,v 1.245 2001-03-25 08:50:42 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    25552555BOOL Win32BaseWindow::SetWindowPlacement(WINDOWPLACEMENT *wndpl)
    25562556{
     2557   dprintf(("SetWindowPlacement %x min  (%d,%d)", getWindowHandle(), wndpl->ptMinPosition.x, wndpl->ptMinPosition.y));
     2558   dprintf(("SetWindowPlacement %x max  (%d,%d)", getWindowHandle(), wndpl->ptMaxPosition.x, wndpl->ptMaxPosition.y));
     2559   dprintf(("SetWindowPlacement %x norm (%d,%d)(%d,%d)", getWindowHandle(), wndpl->rcNormalPosition.left, wndpl->rcNormalPosition.top, wndpl->rcNormalPosition.right, wndpl->rcNormalPosition.bottom));
    25572560   windowpos.ptMinPosition    = wndpl->ptMinPosition;
    25582561   windowpos.ptMaxPosition    = wndpl->ptMaxPosition;
  • trunk/src/user32/windowmsg.cpp

    r5124 r5373  
    1 /* $Id: windowmsg.cpp,v 1.22 2001-02-13 19:59:13 sandervl Exp $ */
     1/* $Id: windowmsg.cpp,v 1.23 2001-03-25 08:50:42 sandervl Exp $ */
    22/*
    33 * Win32 window message APIs for OS/2
     
    231231//******************************************************************************
    232232//******************************************************************************
    233 //******************************************************************************
    234233BOOL WIN32API ReplyMessage(LRESULT result)
    235234{
     
    238237}
    239238//******************************************************************************
    240 //SvL: 24-6-'97 - Added
    241 //******************************************************************************
    242 UINT WIN32API RegisterWindowMessageA(LPCSTR arg1)
     239//******************************************************************************
     240UINT WIN32API RegisterWindowMessageA(LPCSTR lpString)
    243241{
    244242 UINT rc;
    245243
    246     rc = O32_RegisterWindowMessage(arg1);
    247     dprintf(("USER32:  RegisterWindowMessageA %s returned %X\n", arg1, rc));
     244    rc = GlobalAddAtomA(lpString);
     245    dprintf(("USER32:  RegisterWindowMessageA %s returned %X\n", lpString, rc));
    248246    return(rc);
    249247}
    250248//******************************************************************************
    251249//******************************************************************************
    252 UINT WIN32API RegisterWindowMessageW( LPCWSTR arg1)
    253 {
    254  char *astring = UnicodeToAsciiString((LPWSTR)arg1);
    255  UINT  rc;
    256 
     250UINT WIN32API RegisterWindowMessageW( LPCWSTR lpString)
     251{
    257252    dprintf(("USER32:  RegisterWindowMessageW\n"));
    258     rc = O32_RegisterWindowMessage(astring);
    259     FreeAsciiString(astring);
    260     return rc;
     253    return GlobalAddAtomW(lpString);
    261254}
    262255//******************************************************************************
Note: See TracChangeset for help on using the changeset viewer.