Ignore:
Timestamp:
Feb 2, 2001, 8:04:03 PM (25 years ago)
Author:
sandervl
Message:

class, dialog control size & drawedge fixes

File:
1 edited

Legend:

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

    r4976 r5056  
    1 /* $Id: win32wbase.cpp,v 1.230 2001-01-19 23:03:45 sandervl Exp $ */
     1/* $Id: win32wbase.cpp,v 1.231 2001-02-02 19:04:03 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    22212221   RECT oldClientRect = rectClient;
    22222222
    2223     if(getWindowHandle() == 0x68000010) {
    2224         hParent = 0;
    2225     }
    22262223    if (fuFlags &
    22272224       ~(SWP_NOSIZE     | SWP_NOMOVE     | SWP_NOZORDER     |
     
    23972394    }
    23982395
    2399     if(rectClient.left != oldClientRect->left || 
     2396    if(rectClient.left != oldClientRect->left ||
    24002397       rectClient.top != oldClientRect->top)
    24012398    {
     
    32313228
    32323229                if(dwExStyle == value) {
    3233             oldval = value;
     3230                    oldval = value;
    32343231                    break;
    3235         }
     3232                }
    32363233                ss.styleOld = dwExStyle;
    32373234                ss.styleNew = value;
     
    32413238                SendInternalMessageA(WM_STYLECHANGED,GWL_EXSTYLE,(LPARAM)&ss);
    32423239                oldval = ss.styleOld;
    3243         break;
     3240                break;
    32443241        }
    32453242        case GWL_STYLE:
     
    32503247
    32513248                if(dwStyle == value) {
    3252             oldval = value;
     3249                    oldval = value;
    32533250                    break;
    32543251                }
     
    32703267        case GWL_WNDPROC:
    32713268        {
    3272         //Note: Type of SetWindowLong determines new window proc type
     3269                //Note: Type of SetWindowLong determines new window proc type
    32733270                //      UNLESS the new window proc has already been registered
    32743271                //      (use the old type in that case)
    32753272                //      (VERIFIED in NT 4, SP6)
    32763273                WINDOWPROCTYPE type = WINPROC_GetProcType((HWINDOWPROC)value);
    3277         if(type == WIN_PROC_INVALID) {
    3278             type = (fUnicode) ? WIN_PROC_32W : WIN_PROC_32A;
    3279         }
    3280             oldval = (LONG)WINPROC_GetProc(win32wndproc, (fUnicode) ? WIN_PROC_32W : WIN_PROC_32A);
     3274                if(type == WIN_PROC_INVALID) {
     3275                    type = (fUnicode) ? WIN_PROC_32W : WIN_PROC_32A;
     3276                }
     3277                oldval = (LONG)WINPROC_GetProc(win32wndproc, (fUnicode) ? WIN_PROC_32W : WIN_PROC_32A);
    32813278                WINPROC_SetProc((HWINDOWPROC *)&win32wndproc, (WNDPROC)value, type, WIN_PROC_WINDOW);
    32823279                break;
     
    33043301                if(index >= 0 && index/4 < nrUserWindowLong)
    33053302                {
    3306                         oldval = userWindowLong[index/4];
    3307                         userWindowLong[index/4] = value;
     3303                    oldval = userWindowLong[index/4];
     3304                    userWindowLong[index/4] = value;
    33083305                    break;
    33093306                }
    3310             dprintf(("WARNING: SetWindowLong%c %x %d %x returned %x INVALID index!", (fUnicode) ? 'W' : 'A', getWindowHandle(), index, value));
     3307                dprintf(("WARNING: SetWindowLong%c %x %d %x returned %x INVALID index!", (fUnicode) ? 'W' : 'A', getWindowHandle(), index, value));
    33113308                SetLastError(ERROR_INVALID_PARAMETER);
    33123309                return 0;
     
    33363333        break;
    33373334    case GWL_HWNDPARENT:
    3338     value = GetParent();
     3335        value = GetParent();
    33393336        break;
    33403337    case GWL_ID:
     
    33623359 WORD oldval;
    33633360
    3364    if(index >= 0 && index/4 < nrUserWindowLong)
    3365    {
     3361    if(index >= 0 && index/4 < nrUserWindowLong)
     3362    {
    33663363        oldval = ((WORD *)userWindowLong)[index/2];
    33673364        ((WORD *)userWindowLong)[index/2] = value;
    33683365        return oldval;
    3369    }
    3370    SetLastError(ERROR_INVALID_PARAMETER);
    3371    return 0;
    3372 }
    3373 //******************************************************************************
    3374 //******************************************************************************
    3375 WORD Win32BaseWindow::GetWindowWord(int index)
    3376 {
    3377     if(index >= 0 && index/4 < nrUserWindowLong)
    3378     {
    3379         return ((WORD *)userWindowLong)[index/2];
    33803366    }
    33813367    SetLastError(ERROR_INVALID_PARAMETER);
     
    33843370//******************************************************************************
    33853371//******************************************************************************
     3372WORD Win32BaseWindow::GetWindowWord(int index)
     3373{
     3374    if(index >= 0 && index/4 < nrUserWindowLong)
     3375    {
     3376        return ((WORD *)userWindowLong)[index/2];
     3377    }
     3378    SetLastError(ERROR_INVALID_PARAMETER);
     3379    return 0;
     3380}
     3381//******************************************************************************
     3382//******************************************************************************
    33863383void Win32BaseWindow::setWindowId(DWORD id)
    33873384{
     
    34073404 DWORD        magic;
    34083405
    3409   if(hwnd == OSLIB_HWND_DESKTOP)
    3410   {
    3411     return windowDesktop;
    3412   }
    3413 
    3414   win32wnd = (Win32BaseWindow *)OSLibWinGetWindowULong(hwnd, OFFSET_WIN32WNDPTR);
    3415   magic    = OSLibWinGetWindowULong(hwnd, OFFSET_WIN32PM_MAGIC);
    3416 
    3417   if(win32wnd && CheckMagicDword(magic)) {
     3406    if(hwnd == OSLIB_HWND_DESKTOP)
     3407    {
     3408        return windowDesktop;
     3409    }
     3410
     3411    win32wnd = (Win32BaseWindow *)OSLibWinGetWindowULong(hwnd, OFFSET_WIN32WNDPTR);
     3412    magic    = OSLibWinGetWindowULong(hwnd, OFFSET_WIN32PM_MAGIC);
     3413
     3414    if(win32wnd && CheckMagicDword(magic)) {
    34183415        return win32wnd;
    3419   }
     3416    }
    34203417//  dprintf2(("Win32BaseWindow::GetWindowFromOS2Handle: not an Odin os2 window %x", hwnd));
    3421   return 0;
     3418    return 0;
    34223419}
    34233420//******************************************************************************
Note: See TracChangeset for help on using the changeset viewer.