Ignore:
Timestamp:
Aug 30, 1999, 2:00:12 PM (26 years ago)
Author:
sandervl
Message:

Redesign; base class for all window types

File:
1 edited

Legend:

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

    r740 r741  
    1 /* $Id: pmwindow.cpp,v 1.25 1999-08-29 20:05:07 sandervl Exp $ */
     1/* $Id: pmwindow.cpp,v 1.26 1999-08-30 11:59:53 sandervl Exp $ */
    22/*
    33 * Win32 Window Managment Code for OS/2
     
    2020#include <wprocess.h>
    2121#include <misc.h>
    22 #include <win32wnd.h>
     22#include <win32wbase.h>
    2323#include <win32dlg.h>
    2424#include "pmwindow.h"
     
    7878     CS_SIZEREDRAW | CS_HITTEST,
    7979     NROF_WIN32WNDBYTES)) {
    80         dprintf(("WinRegisterClass Win32Window failed"));
     80        dprintf(("WinRegisterClass Win32BaseWindow failed"));
    8181        return(FALSE);
    8282   }
     
    9696 POSTMSG_PACKET *postmsg;
    9797 OSLIBPOINT      point, ClientPoint;
    98  Win32Window    *win32wnd;
     98 Win32BaseWindow    *win32wnd;
    9999 APIRET          rc;
    100100
     
    102102  SetWin32TIB();
    103103
    104   win32wnd = Win32Window::GetWindowFromOS2Handle(hwnd);
     104  win32wnd = Win32BaseWindow::GetWindowFromOS2Handle(hwnd);
    105105
    106106  if(msg != WM_CREATE && win32wnd == NULL) {
     
    109109  }
    110110  if(msg > WIN32APP_USERMSGBASE) {
    111         //win32 app user message
    112         dprintf(("PMWINDOW: Message %x (%x,%x) posted to window %x", (ULONG)msg-WIN32APP_USERMSGBASE, mp1, mp2, hwnd));
     111    //win32 app user message
     112    dprintf(("PMWINDOW: Message %x (%x,%x) posted to window %x", (ULONG)msg-WIN32APP_USERMSGBASE, mp1, mp2, hwnd));
    113113        win32wnd->SendMessageA((ULONG)msg-WIN32APP_USERMSGBASE, (ULONG)mp1, (ULONG)mp2);
    114114  }
     
    182182        if ((pswp->fl & SWP_ZORDER) && (pswp->hwndInsertBehind > HWND_BOTTOM))
    183183        {
    184            Win32Window *wndAfter = Win32Window::GetWindowFromOS2Handle(pswp->hwndInsertBehind);
     184           Win32BaseWindow *wndAfter = Win32BaseWindow::GetWindowFromOS2Handle(pswp->hwndInsertBehind);
    185185           if(wndAfter) wp.hwndInsertAfter = wndAfter->getWindowHandle();
    186186        }
     
    217217        if ((pswp->fl & SWP_ZORDER) && (pswp->hwndInsertBehind > HWND_BOTTOM))
    218218        {
    219            Win32Window *wndAfter = Win32Window::GetWindowFromOS2Handle(pswp->hwndInsertBehind);
     219           Win32BaseWindow *wndAfter = Win32BaseWindow::GetWindowFromOS2Handle(pswp->hwndInsertBehind);
    220220           wp.hwndInsertAfter = wndAfter->getWindowHandle();
    221221        }
     
    434434    case WM_MOUSEMOVE:
    435435    {
    436         //Only send this message when the mouse isn't captured
     436    //Only send this message when the mouse isn't captured
    437437        if(WinQueryCapture(HWND_DESKTOP) != NULLHANDLE) {
    438438                goto RunDefWndProc;
    439         }
     439    }
    440440        ULONG keystate = 0;
    441441        if(WinGetKeyState(HWND_DESKTOP, VK_BUTTON1))
     
    593593
    594594    case WM_HITTEST:
    595         // Only send this message if the window is enabled
    596         if (WinIsWindowEnabled(hwnd)) 
    597         {
    598                 if(win32wnd->MsgHitTest((*(POINTS *)&mp1).x, MapOS2ToWin32Y(OSLIB_HWND_DESKTOP, hwnd, (*(POINTS *)&mp1).y))) {
    599                         goto RunDefWndProc;
    600                 }
     595    // Only send this message if the window is enabled
     596        if (WinIsWindowEnabled(hwnd))
     597    {
     598            if(win32wnd->MsgHitTest((*(POINTS *)&mp1).x, MapOS2ToWin32Y(OSLIB_HWND_DESKTOP, hwnd, (*(POINTS *)&mp1).y))) {
     599                    goto RunDefWndProc;
     600        }
    601601        }
    602602        else    goto RunDefWndProc;
Note: See TracChangeset for help on using the changeset viewer.