Ignore:
Timestamp:
Jan 9, 2000, 5:52:55 PM (26 years ago)
Author:
sandervl
Message:

titlebar/sysmenu fixes + LoadBitmap fix for system bitmaps

File:
1 edited

Legend:

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

    r2384 r2388  
    1 /* $Id: win32wbasepaint.cpp,v 1.2 2000-01-09 15:56:05 sandervl Exp $ */
     1/* $Id: win32wbasepaint.cpp,v 1.3 2000-01-09 16:52:55 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    121121    state = GetMenuState(hSysMenu, SC_MAXIMIZE, MF_BYCOMMAND);
    122122  }
    123   SetCapture(Win32Hwnd);
    124   hdc = GetWindowDC(Win32Hwnd);
     123  SetCapture(getWindowHandle());
     124  hdc = GetWindowDC(getWindowHandle());
    125125  if (wParam == HTMINBUTTON)
    126126    DrawMinButton(hdc,TRUE,FALSE);
     
    132132    BOOL oldstate = pressed;
    133133
    134     GetMessageA(&msg,Win32Hwnd,0,0);
     134    GetMessageA(&msg, getWindowHandle(), 0, 0);
    135135    pressed = (HandleNCHitTest(msg.pt) == wParam);
    136136    if (pressed != oldstate)
     
    143143  }
    144144
    145   while (msg.message != WM_LBUTTONUP);
     145  while (msg.message != WM_NCLBUTTONUP);
    146146
    147147  if (wParam == HTMINBUTTON)
     
    151151
    152152  ReleaseCapture();
    153   ReleaseDC(Win32Hwnd,hdc);
     153  ReleaseDC(getWindowHandle(), hdc);
    154154  /* If the item minimize or maximize of the sysmenu are not there */
    155155  /* or if the style is not present, do nothing */
     
    179179  if((state & MF_DISABLED) || (state & MF_GRAYED) || (state == 0xFFFFFFFF))
    180180    return;
    181   hdc = GetWindowDC(Win32Hwnd);
    182   SetCapture(Win32Hwnd);
     181  hdc = GetWindowDC(getWindowHandle());
     182  SetCapture(getWindowHandle());
    183183  DrawCloseButton(hdc,TRUE,FALSE);
    184184  do
     
    186186    BOOL oldstate = pressed;
    187187
    188     GetMessageA(&msg,Win32Hwnd,0,0);
     188    GetMessageA(&msg, getWindowHandle(), 0, 0);
    189189    pressed = (HandleNCHitTest(msg.pt) == wParam);
     190
    190191    if (pressed != oldstate)
    191192      DrawCloseButton(hdc, pressed, FALSE);
    192   } while (msg.message != WM_LBUTTONUP);
     193  }
     194  while (msg.message != WM_NCLBUTTONUP);
     195
    193196  DrawCloseButton(hdc,FALSE,FALSE);
    194197  ReleaseCapture();
    195   ReleaseDC(Win32Hwnd,hdc);
    196   if (!pressed) return;
     198  ReleaseDC(getWindowHandle(), hdc);
     199
     200  if (!pressed)
     201        return;
     202
    197203  SendInternalMessageA(WM_SYSCOMMAND,SC_CLOSE,*(LPARAM*)&msg.pt);
    198204}
     
    551557    if(hIcon == 0)
    552558      if (!(dwStyle & DS_MODALFRAME))
    553         hIcon = LoadImageA(0, MAKEINTRESOURCEA(OIC_WINEICON), IMAGE_ICON, 0, 0, LR_DEFAULTCOLOR);
     559        hIcon = LoadImageA(0, MAKEINTRESOURCEA(OIC_ODINICON), IMAGE_ICON, 0, 0, LR_DEFAULTCOLOR);
    554560
    555561    if (hIcon)
     
    594600  HDC hdcMem;
    595601
    596   if( !(flags & WIN_MANAGED) )
    597   {
    598602    BITMAP bmp;
    599603    HBITMAP hBmp, hOldBmp;
     
    616620    SelectObject (hdcMem, hOldBmp);
    617621    DeleteDC (hdcMem);
    618   }
    619622}
    620623//******************************************************************************
     
    625628  HDC hdcMem;
    626629
    627   if( !(flags & WIN_MANAGED))
    628   {
    629630    BITMAP  bmp;
    630631    HBITMAP  hBmp,hOldBmp;
     
    652653    SelectObject (hdcMem, hOldBmp);
    653654    DeleteDC( hdcMem );
    654   }
    655655}
    656656//******************************************************************************
     
    661661  HDC hdcMem;
    662662
    663   if( !(flags & WIN_MANAGED))
    664 
    665   {
    666663    BITMAP  bmp;
    667664    HBITMAP  hBmp,hOldBmp;
     
    692689    SelectObject (hdcMem, hOldBmp);
    693690    DeleteDC( hdcMem );
    694   }
    695691}
    696692//******************************************************************************
Note: See TracChangeset for help on using the changeset viewer.