Ignore:
Timestamp:
Jan 16, 2000, 7:17:13 PM (26 years ago)
Author:
cbratschi
Message:

menu and frame changes

File:
1 edited

Legend:

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

    r2452 r2458  
    1 /* $Id: win32wbasenonclient.cpp,v 1.12 2000-01-15 17:27:20 sandervl Exp $ */
     1/* $Id: win32wbasenonclient.cpp,v 1.13 2000-01-16 18:17:13 cbratschi Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2 (non-client methods)
     
    317317//******************************************************************************
    318318//******************************************************************************
    319 VOID Win32BaseWindow::AdjustRectOuter(LPRECT rect,BOOL menu)
    320 {
    321   if(dwStyle & WS_ICONIC) return;
    322 
     319VOID Win32BaseWindow::AdjustMaximizedRect(LPRECT rect)
     320{
    323321  /* Decide if the window will be managed (see CreateWindowEx) */
    324322  //if (!WindowNeedsWMBorder()) //CB: check Options.managed
     
    332330        if (HAS_THINFRAME( dwStyle ))
    333331          InflateRect( rect, GetSystemMetrics(SM_CXBORDER), GetSystemMetrics(SM_CYBORDER));
     332  }
     333}
     334//******************************************************************************
     335//******************************************************************************
     336VOID Win32BaseWindow::AdjustRectOuter(LPRECT rect,BOOL menu)
     337{
     338  if(dwStyle & WS_ICONIC) return;
     339
     340  /* Decide if the window will be managed (see CreateWindowEx) */
     341  //if (!WindowNeedsWMBorder()) //CB: check Options.managed
     342  {
     343    if (HAS_THICKFRAME(dwStyle,dwExStyle ))
     344      InflateRect( rect, GetSystemMetrics(SM_CXFRAME), GetSystemMetrics(SM_CYFRAME) );
     345    else
     346      if (HAS_DLGFRAME( dwStyle, dwExStyle ))
     347        InflateRect(rect, GetSystemMetrics(SM_CXDLGFRAME), GetSystemMetrics(SM_CYDLGFRAME) );
     348      else
     349        if (HAS_THINFRAME( dwStyle ))
     350          InflateRect( rect, GetSystemMetrics(SM_CXBORDER), GetSystemMetrics(SM_CYBORDER));
    334351
    335352    if ((dwStyle & WS_CAPTION) == WS_CAPTION)
     
    367384  LONG result = 0;
    368385  UINT style;
     386
     387    dprintf(("Default WM_NCCALCSIZE handler"));
    369388
    370389    if (!calcValidRects) return 0;
     
    408427  RECT rect = rectWindow;
    409428
     429  if (dwStyle & WS_MINIMIZE) return HTCAPTION;
     430
    410431  if (!PtInRect(&rect,pt)) return HTNOWHERE;
    411 
    412   if (dwStyle & WS_MINIMIZE) return HTCAPTION;
    413432
    414433  if (!(flags & WIN_MANAGED))
     
    11971216LONG Win32BaseWindow::HandleNCRButtonUp(WPARAM wParam,LPARAM lParam)
    11981217{
    1199   if (wParam == HTCAPTION)
    1200   {
    1201     if (GetActiveWindow() != Win32Hwnd)
     1218  switch(wParam)
     1219  {
     1220    case HTCAPTION:
     1221      if (GetActiveWindow() != Win32Hwnd)
    12021222        SetActiveWindow();
    12031223
    1204     if ((GetActiveWindow() == Win32Hwnd) && (dwStyle & WS_SYSMENU))
    1205     {
    1206       SendInternalMessageA(WM_SYSCOMMAND,SC_MOUSEMENU+HTCAPTION,lParam);
    1207     }
     1224      if ((GetActiveWindow() == Win32Hwnd) && (dwStyle & WS_SYSMENU))
     1225      {
     1226        SendInternalMessageA(WM_SYSCOMMAND,SC_MOUSEMENU+HTCAPTION,lParam);
     1227      }
     1228      break;
     1229
     1230    default:
     1231      break;
    12081232  }
    12091233
     
    12251249    case SC_SIZE:
    12261250    {
    1227       DWORD flags = 0;
     1251      DWORD flags;
     1252
     1253      if (dwStyle & WS_MAXIMIZE) break;
    12281254
    12291255      switch ((wParam & 0xF)+2)
     
    12601286          flags = TFOS_BOTTOM | TFOS_RIGHT;
    12611287          break;
     1288
     1289        default:
     1290          flags = TFOS_BOTTOM | TFOS_RIGHT;
     1291          break;
    12621292      }
    12631293      if (flags) FrameTrackFrame(this,flags);
     
    12661296
    12671297    case SC_MOVE:
     1298        if (dwStyle & WS_MAXIMIZE) break;
    12681299        FrameTrackFrame(this,TFOS_MOVE);
    12691300        break;
Note: See TracChangeset for help on using the changeset viewer.