Ignore:
Timestamp:
Jan 3, 2003, 5:35:58 PM (23 years ago)
Author:
sandervl
Message:

Merged Rewind menu control

File:
1 edited

Legend:

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

    r6762 r9598  
    1 /* $Id: win32wmisc.cpp,v 1.1 2001-09-19 15:39:51 sandervl Exp $ */
     1/* $Id: win32wmisc.cpp,v 1.2 2003-01-03 16:35:57 sandervl Exp $ */
    22/*
    33 * Misc. functions for window management
     
    3232#include "win32wndhandle.h"
    3333#include "win32wmisc.h"
     34#include "ctrlconf.h"
    3435
    3536//******************************************************************************
     
    141142void NC_GetSysPopupPos( HWND hwnd, RECT* rect )
    142143{
    143    Win32BaseWindow *win32wnd = Win32BaseWindow::GetWindowFromHandle(hwnd);
    144 
    145    if (!win32wnd) return;
    146 
    147    win32wnd->GetSysPopupPos(rect);
    148    RELEASE_WNDOBJ(win32wnd);
    149 }
    150 //******************************************************************************
    151 //******************************************************************************
     144    if (IsIconic(hwnd)) GetWindowRect( hwnd, rect );
     145    else
     146    {
     147#ifdef __WIN32OS2__
     148        Win32BaseWindow *win32wnd = Win32BaseWindow::GetWindowFromHandle(hwnd);
     149        if (!win32wnd) return;
     150
     151        win32wnd->GetSysPopupPos(rect);
     152
     153        RELEASE_WNDOBJ(win32wnd);
     154#else
     155        WND *wndPtr = WIN_FindWndPtr( hwnd );
     156        if (!wndPtr) return;
     157
     158        NC_GetInsideRect( hwnd, rect );
     159        OffsetRect( rect, wndPtr->rectWindow.left, wndPtr->rectWindow.top);
     160        if (wndPtr->dwStyle & WS_CHILD)
     161            ClientToScreen( GetParent(hwnd), (POINT *)rect );
     162        if (TWEAK_WineLook == WIN31_LOOK) {
     163            rect->right = rect->left + GetSystemMetrics(SM_CXSIZE);
     164            rect->bottom = rect->top + GetSystemMetrics(SM_CYSIZE);
     165        }
     166        else {
     167            rect->right = rect->left + GetSystemMetrics(SM_CYCAPTION) - 1;
     168            rect->bottom = rect->top + GetSystemMetrics(SM_CYCAPTION) - 1;
     169        }
     170        WIN_ReleaseWndPtr( wndPtr );
     171#endif
     172    }
     173}
     174//*****************************************************************************
     175//*****************************************************************************
     176BOOL NC_DrawSysButton95 (HWND hwnd, HDC hdc, BOOL down)
     177{
     178    BOOL ret;
     179
     180    Win32BaseWindow *win32wnd = Win32BaseWindow::GetWindowFromHandle(hwnd);
     181    if (!win32wnd) return FALSE;
     182
     183    ret = win32wnd->DrawSysButton(hdc, NULL);
     184
     185    RELEASE_WNDOBJ(win32wnd);
     186
     187    return ret;
     188}
     189//*****************************************************************************
     190//*****************************************************************************
     191INT NC_HandleNCHitTest( HWND hwnd, POINT pt)
     192{
     193    INT ht;
     194
     195    Win32BaseWindow *win32wnd = Win32BaseWindow::GetWindowFromHandle(hwnd);
     196    if(win32wnd==NULL) {
     197        //SvL: This happens in Moraff's YourJongg 2.0, return here
     198        //TODO: Check if this is supposed to happen at all...
     199        return HTERROR;
     200    }
     201
     202    ht = win32wnd->HandleNCHitTest(pt);
     203    RELEASE_WNDOBJ(win32wnd);
     204
     205    return ht;
     206}
     207//*****************************************************************************
     208//*****************************************************************************
Note: See TracChangeset for help on using the changeset viewer.