Ignore:
Timestamp:
Jul 16, 1999, 1:32:10 PM (26 years ago)
Author:
sandervl
Message:

Misc window class changes/bugfixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/new/win32wnd.h

    r309 r314  
    1 /* $Id: win32wnd.h,v 1.3 1999-07-15 18:03:03 sandervl Exp $ */
     1/* $Id: win32wnd.h,v 1.4 1999-07-16 11:32:09 sandervl Exp $ */
    22/*
    33 * Win32 Window Code for OS/2
     
    1717#include <win32class.h>
    1818#include <gen_object.h>
     19#include <win32wndchild.h>
    1920
    2021class Win32Window;
    21 
    22 #define WIN2OS2HWND(a)  (Win32Window*)(a^a)
    23 #define OS22WINHWND(a)  (a^a)
    2422
    2523#define OFFSET_WIN32WNDPTR      0
     
    4442#define WM_WIN32_POSTMESSAGEW   0x4001
    4543
    46 class Win32Window : public GenericObject
     44class Win32Window : private GenericObject, private ChildWindow
    4745{
    4846public:
     
    7775         HWND   getWindowHandle()               { return Win32Hwnd; };
    7876         HWND   getOS2WindowHandle()            { return OS2Hwnd; };
    79    Win32Window *getParent()                     { return parent; };
    80          void   setParent(Win32Window *pwindow) { parent = pwindow; };
     77   Win32Window *getParent()                     { return (Win32Window *)ChildWindow::GetParent(); };
     78         void   setParent(Win32Window *pwindow) { ChildWindow::SetParent((ChildWindow *)pwindow); };
    8179       WNDPROC  getWindowProc()                 { return win32wndproc; };
    8280         void   setWindowProc(WNDPROC newproc)  { win32wndproc = newproc; };
     
    8785         void   setFlags(DWORD newflags)        { flags = newflags; };
    8886
     87         BOOL   SetMenu(ULONG hMenu);
     88         BOOL   ShowWindow(ULONG nCmdShow);
     89         BOOL   SetWindowPos(HWND hwndInsertAfter, int x, int y, int cx, int cy, UINT fuFlags);
     90         BOOL   DestroyWindow();
     91         HWND   SetActiveWindow();
     92         HWND   GetParent();
     93         HWND   SetParent(HWND hwndNewParent);
     94         BOOL   IsChild(HWND hwndParent);
     95         HWND   GetTopWindow();
     96         BOOL   UpdateWindow();
     97         BOOL   IsIconic();
     98
    8999       LRESULT  SendMessageA(ULONG msg, WPARAM wParam, LPARAM lParam);
    90100       LRESULT  SendMessageW(ULONG msg, WPARAM wParam, LPARAM lParam);
    91        LRESULT  PostMessageA(ULONG msg, WPARAM wParam, LPARAM lParam);
    92        LRESULT  PostMessageW(ULONG msg, WPARAM wParam, LPARAM lParam);
     101       BOOL     PostMessageA(ULONG msg, WPARAM wParam, LPARAM lParam);
     102       BOOL     PostMessageW(ULONG msg, WPARAM wParam, LPARAM lParam);
    93103       LRESULT  DefWindowProcA(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
    94104       LRESULT  DefWindowProcW(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
     
    98108Win32WndClass  *getClass()  { return windowClass; };
    99109
     110static Win32Window *GetWindowFromHandle(HWND hwnd);
     111
    100112protected:
    101113        void    Init();
    102114
    103 
    104115        HWND    OS2Hwnd;
     116        HWND    OS2HwndMenu;
    105117        HWND    Win32Hwnd;
    106118        BOOL    isUnicode;
     
    113125      WNDPROC   win32wndproc;           //GWL_WNDPROC
    114126        ULONG   hInstance;              //GWL_HINSTANCE
    115    Win32Window *parent;                 //GWL_HWNDPARENT
     127//Moved in ChildWindow class
     128/////   Win32Window *parent;                    //GWL_HWNDPARENT
    116129        ULONG   windowId;               //GWL_ID
    117130        ULONG   userData;               //GWL_USERDATA
     
    131144        ULONG   nrUserWindowLong;
    132145
     146        RECT    rectWindow;
     147        RECT    rectClient;
     148
    133149Win32WndClass  *windowClass;
    134150
     
    136152
    137153private:
     154#ifndef OS2_INCLUDED
    138155        BOOL  CreateWindowExA(CREATESTRUCTA *lpCreateStruct, ATOM classAtom);
    139156
    140157        void  GetMinMaxInfo(POINT *maxSize, POINT *maxPos, POINT *minTrack, POINT *maxTrack );
     158
     159        LONG  SendNCCalcSize(BOOL calcValidRect,
     160                             RECT *newWindowRect, RECT *oldWindowRect,
     161                             RECT *oldClientRect, WINDOWPOS *winpos,
     162                             RECT *newClientRect );
     163
     164     LRESULT  sendMessage(ULONG msg, WPARAM wParam, LPARAM lParam)
     165     {
     166        if(isUnicode)
     167                return SendMessageW(msg, wParam, lParam);
     168        else    return SendMessageA(msg, wParam, lParam);
     169     }
     170#endif
    141171};
    142172
Note: See TracChangeset for help on using the changeset viewer.