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

Lots of menu fixes

File:
1 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();
Note: See TracChangeset for help on using the changeset viewer.