Changeset 2406 for trunk/src


Ignore:
Timestamp:
Jan 11, 2000, 2:06:27 PM (26 years ago)
Author:
sandervl
Message:

Lots of menu fixes

Location:
trunk/src/user32/new
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/new/menu.cpp

    r2396 r2406  
    1 /* $Id: menu.cpp,v 1.5 2000-01-10 17:18:08 cbratschi Exp $*/
     1/* $Id: menu.cpp,v 1.6 2000-01-11 13:06:24 sandervl Exp $*/
    22/*
    33 * Menu functions
     
    10841084        else
    10851085            FillRect( hdc, &rect, GetSysColorBrush(COLOR_HIGHLIGHT) );
    1086     else
    1087         FillRect( hdc, &rect, GetSysColorBrush(COLOR_MENU) );
     1086    else {
     1087        //SvL: TODO: Bug in GDI32; draws black rectangle instead of menu color
     1088        ///          for everything except the 1st menu item
     1089        RECT dummy = rect;
     1090        dummy.bottom = dummy.top+1;
     1091        dummy.right  = dummy.right+1;
     1092        FillRect( hdc, &dummy, GetSysColorBrush(COLOR_HIGHLIGHT) );
     1093        FillRect( hdc, &rect, GetSysColorBrush(COLOR_MENU) );
     1094    }
    10881095
    10891096    SetBkMode( hdc, TRANSPARENT );
     
    17821789    /* Find where to insert new item */
    17831790
    1784     if ((flags & MF_BYPOSITION) &&
    1785         ((pos == (UINT)-1) || (pos == menu->nItems)))
     1791    if ((pos==(UINT)-1) || ((flags & MF_BYPOSITION) && (pos == menu->nItems)))
    17861792    {
    17871793        /* Special case: append to menu */
     
    21172123   {
    21182124        Win32BaseWindow *win32wnd = Win32BaseWindow::GetWindowFromHandle(menu->hWnd);
     2125        if(win32wnd==NULL)
     2126                DebugInt3();
    21192127
    21202128        ht = win32wnd->HandleNCHitTest(pt);
     
    37163724
    37173725
    3718     if (GetWindowLongA(hWnd,GWL_STYLE) & WS_CHILD)
     3726    if (!(GetWindowLongA(hWnd,GWL_STYLE) & WS_CHILD))
    37193727    {
    37203728        if (GetCapture() == hWnd) ReleaseCapture();
  • trunk/src/user32/new/oslibmsg.cpp

    r2400 r2406  
    1 /* $Id: oslibmsg.cpp,v 1.12 2000-01-10 23:29:12 sandervl Exp $ */
     1/* $Id: oslibmsg.cpp,v 1.13 2000-01-11 13:06:25 sandervl Exp $ */
    22/*
    33 * Window message translation functions for OS/2
     
    220220        MsgThreadPtr->msg  = 0;
    221221        MsgThreadPtr->hwnd = 0;
    222         return (pMsg->message == WINWM_QUIT);
     222        return (pMsg->message != WINWM_QUIT);
    223223  }
    224224
     
    231231        while(rc == FALSE);
    232232
    233         return (pMsg->message == WINWM_QUIT);
     233        return (pMsg->message != WINWM_QUIT);
    234234  }
    235235  else
  • trunk/src/user32/new/oslibwin.cpp

    r2335 r2406  
    1 /* $Id: oslibwin.cpp,v 1.33 2000-01-05 21:25:04 cbratschi Exp $ */
     1/* $Id: oslibwin.cpp,v 1.34 2000-01-11 13:06:25 sandervl Exp $ */
    22/*
    33 * Window API wrappers for OS/2
     
    11621162  return WinGetLastError(GetThreadHAB()) & 0xFFFF;
    11631163}
     1164//******************************************************************************
     1165//******************************************************************************
     1166void OSLibWinShowTaskList(HWND hwndFrame)
     1167{
     1168  WinPostMsg(NULLHANDLE, WM_SYSCOMMAND, (MPARAM)SC_TASKMANAGER, MPFROM2SHORT(CMDSRC_MENU, TRUE));
     1169}
     1170//******************************************************************************
     1171//******************************************************************************
  • trunk/src/user32/new/oslibwin.h

    r2292 r2406  
    1 /* $Id: oslibwin.h,v 1.28 2000-01-02 19:30:43 cbratschi Exp $ */
     1/* $Id: oslibwin.h,v 1.29 2000-01-11 13:06:26 sandervl Exp $ */
    22/*
    33 * Window API wrappers for OS/2
     
    288288ULONG OSLibWinGetLastError();
    289289
     290void  OSLibWinShowTaskList(HWND hwndFrame);
     291
    290292#endif //__OSLIBWIN_H__
  • trunk/src/user32/new/win32wbase.cpp

    r2403 r2406  
    1 /* $Id: win32wbase.cpp,v 1.31 2000-01-11 10:38:34 sandervl Exp $ */
     1/* $Id: win32wbase.cpp,v 1.32 2000-01-11 13:06:26 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    654654  {
    655655        if (cs->hMenu) {
    656             SetMenu(cs->hMenu);
     656            ::SetMenu(getWindowHandle(), cs->hMenu);
    657657        }
    658658        else {
    659659                if (windowClass->getMenuNameA()) {
    660660                        cs->hMenu = LoadMenuA(cs->hInstance, windowClass->getMenuNameA());
    661                         if (cs->hMenu) SetMenu(cs->hMenu );
     661                        if (cs->hMenu) ::SetMenu(getWindowHandle(), cs->hMenu );
    662662                }
    663663        }
     
    16731673
    16741674    default:
    1675         if(Msg > WM_USER) {
    1676             return 0;
    1677         }
    1678         return 1; //CB: shouldn't this be 0?
     1675        return 0;
    16791676    }
    16801677}
  • trunk/src/user32/new/win32wbasenonclient.cpp

    r2403 r2406  
    1 /* $Id: win32wbasenonclient.cpp,v 1.1 2000-01-11 10:39:00 sandervl Exp $ */
     1/* $Id: win32wbasenonclient.cpp,v 1.2 2000-01-11 13:06:27 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2 (non-client methods)
     
    12081208
    12091209    case SC_TASKLIST:
    1210         WinExec("taskman.exe",SW_SHOWNORMAL);
     1210        OSLibWinShowTaskList(getOS2FrameWindowHandle());
    12111211        break;
    12121212
Note: See TracChangeset for help on using the changeset viewer.