home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1998 May / Pcwk5b98.iso / Borland / Cplus45 / BC45 / OWLINC.PAK / WINDOW.H < prev    next >
C/C++ Source or Header  |  1995-08-29  |  60KB  |  1,738 lines

  1. //----------------------------------------------------------------------------
  2. // ObjectWindows
  3. // (C) Copyright 1991, 1994 by Borland International, All Rights Reserved
  4. //
  5. //   Base window class definition, including HWND encapsulation.
  6. //----------------------------------------------------------------------------
  7. #if !defined(OWL_WINDOW_H)
  8. #define OWL_WINDOW_H
  9.  
  10. #if !defined(OWL_OWLDEFS_H)
  11. # include <owl/owldefs.h>
  12. #endif
  13. #if !defined(OSL_GEOMETRY_H)
  14. # include <osl/geometry.h>
  15. #endif
  16. #if !defined(OWL_CLIPBOAR_H)
  17. # include <owl/clipboar.h>
  18. #endif
  19. #if !defined(OWL_WINDOWEV_H)
  20. # include <owl/windowev.h>
  21. #endif
  22. #if !defined(OWL_APPLICAT_H)
  23. # include <owl/applicat.h>
  24. #endif
  25. #if defined(BI_MULTI_THREAD) && !defined(CLASSLIB_THREAD_H)
  26. # include <classlib/thread.h>
  27. #endif
  28. #include <owl/window.rh>
  29.  
  30. class _OWLCLASS TApplication;
  31. class _OWLCLASS TModule;
  32. class _OWLCLASS TScroller;
  33. class _OWLCLASS TRegion;
  34. class _OWLCLASS TWindow;
  35. class _OWLCLASS TDC;
  36.  
  37. //
  38. //  enum TWindowFlag
  39. //  ---- -----------
  40. //
  41. enum TWindowFlag {
  42.   wfAlias           = 0x0001,  // TWindow is an alias to a preexisting HWND
  43.   wfAutoCreate      = 0x0002,  // Create the HWindow when our parent is created
  44.   wfFromResource    = 0x0004,  // HWindow comes from HWND created from resource
  45.   wfShrinkToClient  = 0x0008,  // Shrink a frame window to its client's size
  46.   wfMainWindow      = 0x0010,  // This frame window is the main window
  47.   wfFullyCreated    = 0x0020,  // Window is fully created & not being destroyed
  48.   wfStreamTop       = 0x0040,  // This window is the topmost one to stream
  49.   wfPredefinedClass = 0x0080,  // Window class used was not defined by Owl
  50.   wfTransfer        = 0x0100,  // Transfer enabled
  51.   wfUnHidden        = 0x0200,  // Used temporarily when destroying MDI child
  52.   wfUnDisabled      = 0x0400,  // Used temporarily when destroying MDI child
  53.   wfDeleteOnClose   = 0x0800   // Window is condemned on EvClose
  54. };
  55.  
  56. //
  57. // Transfer function flags
  58. //
  59. enum TTransferDirection {
  60.   tdGetData,    // Get data from the window into the buffer
  61.   tdSetData,    // Set data from the buffer into the window
  62.   tdSizeData    // Just query the window data size in bytes
  63. };
  64.  
  65. //
  66. // Mixin window event implementation return status
  67. //
  68. enum TEventStatus {
  69.   esPartial,    // Additional handlers may be invoked
  70.   esComplete    // No additional handlers are needed
  71. };
  72.  
  73. //
  74. // special background color flags for EvEraseBkgnd processing
  75. //
  76. const uint32 NoColor = 0xFF000000l;  // let DefWindowProc erase
  77. const uint32 NoErase = 0xFE000000l;  // don't erase, wait for Paint
  78.  
  79. //
  80. //  windows 3.1 windowsx.h name confict with TWindows::GetFirstChild()
  81. //
  82. #if defined(GetFirstChild)
  83. # undef GetFirstChild(hwnd)
  84. #endif
  85.  
  86. //
  87. // Member and non-member action and conditional function types used with
  88. // ForEach and FirstThat.
  89. //
  90. typedef void (*TActionFunc)(TWindow* win, void* param);
  91. typedef bool (*TCondFunc)(TWindow* win, void* param);
  92.  
  93. typedef void (TWindow::*TActionMemFunc)(TWindow* win, void* param);
  94. typedef bool (TWindow::*TCondMemFunc)(TWindow* win, void* param);
  95.  
  96. //
  97. //  class TCommandEnabler
  98. //  ----- ---------------
  99. //
  100. //  base class for an extensible interface for auto enabling/disabling of
  101. //  commands (menu items, tool bar buttons, ...)
  102. //
  103. class _OWLCLASS TCommandEnabler {
  104.   public:
  105.     const uint  Id;
  106.  
  107.     TCommandEnabler(uint id, HWND hWndReceiver = 0);
  108.  
  109.     virtual void  Enable(bool enable = true);  // sets "Handled" to true
  110.     virtual void  SetText(const char far* text) = 0;
  111.  
  112.     enum {Unchecked, Checked, Indeterminate};
  113.     virtual void  SetCheck(int check) = 0;  // Pass above enum
  114.  
  115.     bool        SendsCommand() const {return !(Handled&NonSender);}
  116.  
  117.     bool        GetHandled() {return Handled & WasHandled;}
  118.     bool        IsReceiver(HWND hReceiver) {return hReceiver==HWndReceiver;}
  119.  
  120.   protected:
  121.     void        SetHandled() {Handled |= WasHandled;}
  122.     const HWND  HWndReceiver;
  123.  
  124.     enum {WasHandled = 1, NonSender = 2};
  125.  
  126.     // Will rename this member in a later rev. Use accessors to Get/Set
  127.     //
  128.     uint        Handled;
  129. };
  130.  
  131. //
  132. //  struct TWindowsAttr
  133. //  ------ ------------
  134. //
  135. //  Window *Creation* attributes. Don't rely on these to track once HWindow
  136. //  has been created, use member functions to access information.
  137. //
  138. struct TWindowAttr {
  139.     uint32     Style;
  140.     uint32     ExStyle;
  141.     int        X, Y, W, H;
  142.     TResId     Menu;        // Menu resource id
  143.     int        Id;          // Child identifier
  144.     char far*  Param;
  145.     TResId     AccelTable;  // Accelerator table resource id
  146. };
  147.  
  148. //
  149. //  class TWindow
  150. //  ----- -------
  151. //
  152. class _OWLCLASS TWindow : virtual public TEventHandler,
  153.                           virtual public TStreamableBase {
  154.   public:
  155.     class _OWLCLASS_RTL TXWindow : public TXOwl {
  156.       public:
  157.         TXWindow(TWindow* win = 0, uint resourceId = IDS_INVALIDWINDOW);
  158.         TXWindow(const TXWindow& src);
  159.         int Unhandled(TModule* app, unsigned promptResId);
  160.         TXOwl* Clone();
  161.         void Throw() {throw *this;}
  162.         TWindow*      Window;
  163.         static string Msg(TWindow* wnd, uint resourceid);
  164.     };
  165.  
  166.     TStatus        Status;
  167.     HWND           HWindow;  // handle to associated MS-Windows window
  168.     char far*      Title;
  169.     TWindow*       Parent;
  170.     TWindowAttr    Attr;
  171.     WNDPROC        DefaultProc;
  172.     TScroller*     Scroller;
  173.  
  174.     TWindow(TWindow*        parent,
  175.             const char far* title = 0,
  176.             TModule*        module = 0);
  177.  
  178.     TWindow(HWND hWnd, TModule* module = 0);
  179.  
  180.     virtual ~TWindow();
  181.  
  182.     //
  183.     // two iterators that take function pointers
  184.     //
  185.     TWindow*          FirstThat(TCondFunc test, void* paramList = 0);
  186.     void              ForEach(TActionFunc action, void* paramList = 0);
  187.  
  188.     //
  189.     // two iterators that take pointers to member functions
  190.     //
  191.     TWindow*          FirstThat(TCondMemFunc test, void* paramList = 0);
  192.     void              ForEach(TActionMemFunc action, void* paramList = 0);
  193.  
  194.     //
  195.     // other functions for iteration
  196.     //
  197.     TWindow*          Next() {return SiblingList;}
  198.     void              SetNext(TWindow* next) {SiblingList = next;}
  199.     TWindow*          GetFirstChild()
  200.                           {return ChildList ? ChildList->SiblingList : 0;}
  201.     TWindow*          GetLastChild() {return ChildList;}
  202.     TWindow*          Previous();
  203.     unsigned          NumChildren();  // number of child windows
  204.  
  205.     //
  206.     // query and set the flags
  207.     //
  208.     void              SetFlag(TWindowFlag mask) {Flags |= uint32(mask);}
  209.     void              ClearFlag(TWindowFlag mask) {Flags &= uint32(~mask);}
  210.     bool              IsFlagSet(TWindowFlag mask) {return (Flags & mask) ? 1 : 0;}
  211.  
  212.     //
  213.     // sets/clears flag which indicates that the TWindow should be
  214.     // created if a create is sent while in the parent's child list
  215.     //
  216.     void              EnableAutoCreate() {SetFlag(wfAutoCreate);}
  217.     void              DisableAutoCreate() {ClearFlag(wfAutoCreate);}
  218.  
  219.     //
  220.     // sets flag which indicates that the TWindow can/will transfer data
  221.     // via the transfer mechanism
  222.     //
  223.     void              EnableTransfer() {SetFlag(wfTransfer);}
  224.     void              DisableTransfer() {ClearFlag(wfTransfer);}
  225.  
  226.     //
  227.     // Window's default module access functions
  228.     //
  229.     TModule*          GetModule() const {return Module;}
  230.     void              SetModule(TModule* module) {Module = module;}
  231.  
  232.     TApplication*     GetApplication() const {return Application;}
  233.     WNDPROC           GetThunk() const {return Thunk;}
  234.     virtual bool      Register();
  235.  
  236.     //
  237.     // create/destroy an MS_Windows element to be associated with an OWL window
  238.     //
  239.     virtual bool      Create();
  240.     virtual void      PerformCreate(int menuOrId);
  241.     bool              CreateChildren();
  242.     virtual void      Destroy(int retVal = 0);
  243.  
  244.     //
  245.     // suggest an Owl window to close itself
  246.     //
  247.     virtual void      CloseWindow(int retVal = 0);
  248.  
  249.     //
  250.     // Unconditionally shut down a given window. Destroy() is called to
  251.     // destroy the HWindow, & then the window is deleted. Non-static version
  252.     // is safe as long as it is inline and not called on itself
  253.     //
  254.     static void       ShutDownWindow(TWindow* win, int retVal = 0);
  255.     void              ShutDownWindow(int retVal = 0)
  256.                           {ShutDownWindow(this, retVal);}
  257.  
  258. #if defined(BI_MULTI_THREAD)
  259.     //
  260.     // override TEventHandler::Dispatch() to handle multi-thread
  261.     // synchronization
  262.     //
  263.     virtual LRESULT  Dispatch(TEventInfo& info, WPARAM wp, LPARAM lp = 0);
  264. #endif
  265.  
  266.     //
  267.     // called from TApplication::ProcessAppMsg() to give the window an
  268.     // opportunity to perform preprocessing of the Windows message
  269.     //
  270.     // if you return true, further processing of the message is halted
  271.     //
  272.     // if you override this method in a derived class, make sure to call this
  273.     // routine because it handles translation of accelerators...
  274.     //
  275.     virtual bool      PreProcessMsg(MSG& msg);
  276.     virtual bool      IdleAction(long idleCount);
  277.     virtual bool      HoldFocusHWnd(HWND hWndLose, HWND hWndGain);
  278.  
  279.     int               GetId() const {return Attr.Id;}
  280.     TWindow*          ChildWithId(int id) const;
  281.  
  282.     virtual void      SetParent(TWindow* newParent);
  283.     virtual bool      SetDocTitle(const char far* docname, int index);
  284.  
  285.     void              Show(int cmdShow);
  286.     void              SetCaption(const char far* title);
  287.     void              GetWindowTextTitle();
  288.     void              GetHWndState();
  289.     bool              SetCursor(TModule* module, TResId resId);
  290.     void              SetBkgndColor(uint32 color) {BkgndColor = color;}
  291.  
  292.     virtual bool      CanClose();
  293.  
  294.     //
  295.     // forwards the current event to "hWnd" using either PostMessage() or
  296.     // SendMessage(). Owl window version calls directly to window proc on send.
  297.     //
  298.     LRESULT           ForwardMessage(HWND hWnd, bool send = true);
  299.     LRESULT           ForwardMessage(bool send = true);
  300.  
  301.     //
  302.     // send message to all children
  303.     //
  304.     void              ChildBroadcastMessage(uint msg, WPARAM wParam=0, LPARAM lParam=0);
  305.  
  306.     //
  307.     // Notify a window (parent usually) of a child action.
  308.     //
  309.     void              SendNotification(int id, int notifyCode, HWND hCtl,
  310.                                        uint msg = WM_COMMAND);
  311.  
  312.     //
  313.     // Called from StdWndProc to allow exceptions to be caught and suspended.
  314.     // Calls HandleMessage from within try block. Catches and suspends all
  315.     // exceptions before returning to Windows (Windows is not exception safe).
  316.     //
  317.     LRESULT           ReceiveMessage(uint   msg,
  318.                                      WPARAM wParam = 0,
  319.                                      LPARAM lParam = 0);
  320.  
  321.     //
  322.     // Call a Window's window proc to handle a message. Similar to SendMessage
  323.     // but more direct.
  324.     //
  325.     LRESULT           HandleMessage(uint   msg,
  326.                                     WPARAM wParam = 0,
  327.                                     LPARAM lParam = 0);
  328.  
  329.     //
  330.     // virtual functions called to handle a message, and to deal with an
  331.     // unhandled message in a default way.
  332.     //
  333.     virtual LRESULT   WindowProc(uint msg, WPARAM wParam, LPARAM lParam);
  334.     virtual LRESULT   DefWindowProc(uint msg, WPARAM wParam, LPARAM lParam);
  335.  
  336.     //
  337.     // called by WindowProc() to handle WM_COMMANDs
  338.     //
  339.     // "id"         - specifies the identifier of the menu item or control
  340.     //
  341.     // "hWndCtl"    - specifies the control sending the message if the message
  342.     //                is from a control; otherwise it is 0
  343.     //
  344.     // "notifyCode" - specifies the notification message if the message is from
  345.     //                a control. if the message is from an accelerator, it is 1.
  346.     //                if the message is from a menu, it is 0
  347.     //
  348.     virtual LRESULT   EvCommand(uint id, HWND hWndCtl, uint notifyCode);
  349.  
  350.     //
  351.     // called by WindowProc() to handle WM_COMMAND_ENABLE, & helper function
  352.     //
  353.     virtual void      EvCommandEnable(TCommandEnabler& ce);
  354.     void              RouteCommandEnable(HWND hInitCmdTarget, TCommandEnabler& ce);
  355.     
  356.  
  357.     //
  358.     // default processing, deals with special cases or calling DefWindowProc
  359.     //
  360.     LRESULT           DefaultProcessing();
  361.  
  362.     //
  363.     // Paint function called by base classes when responding to WM_PAINT
  364.     //
  365.     virtual void      Paint(TDC& dc, bool erase, TRect& rect);
  366.  
  367.     //
  368.     // transfer buffer
  369.     //
  370.     void              SetTransferBuffer(void* transferBuffer)
  371.                           {TransferBuffer = transferBuffer;}
  372.     virtual uint      Transfer(void* buffer, TTransferDirection direction);
  373.     virtual void      TransferData(TTransferDirection direction);
  374.  
  375.     //
  376.     // installs the thunk as the window function and saves the previous window
  377.     // function in "DefaultProc"
  378.     //
  379.     void              SubclassWindowFunction();
  380.  
  381.     //
  382.     // Encapsulated HWND functions inline
  383.     //
  384.  
  385.     //
  386.     // allow a TWindow& to be used as an HWND in Windows API calls
  387.     //
  388.     operator          HWND() const {return HWindow;}
  389.     bool              IsWindow() const {return ::IsWindow(HWindow);}
  390.  
  391.     //
  392.     // messages
  393.     //
  394.     LRESULT           SendMessage(uint   msg,
  395.                                   WPARAM wParam = 0,
  396.                                   LPARAM lParam = 0);
  397.     LRESULT           SendDlgItemMessage(int    childId,
  398.                                          uint   msg,
  399.                                          WPARAM wParam = 0,
  400.                                          LPARAM lParam = 0);
  401.     bool              PostMessage(uint   msg,
  402.                                   WPARAM wParam = 0,
  403.                                   LPARAM lParam = 0);
  404.     static HWND       GetCapture();
  405.     HWND              SetCapture();
  406.     static void       ReleaseCapture();
  407.     static HWND       GetFocus();
  408.     HWND              SetFocus();
  409.     bool              IsWindowEnabled() const;
  410.     virtual bool      EnableWindow(bool enable);
  411.     void              SetRedraw(bool redraw);
  412.  
  413.     //
  414.     // window coordinates, dimensions...
  415.     //
  416.     void              ScreenToClient(TPoint& point) const;
  417.     void              MapWindowPoints(HWND    hWndTo,
  418.                                       TPoint* points,
  419.                                       int     count) const;
  420.     void              GetClientRect(TRect& rect) const;
  421.     TRect             GetClientRect() const;
  422.     static HWND       WindowFromPoint(const TPoint& point);
  423.     HWND              ChildWindowFromPoint(const TPoint& point) const;
  424.     void              ClientToScreen(TPoint& point) const;
  425.     void              GetWindowRect(TRect& rect) const;
  426.     TRect             GetWindowRect() const;
  427.     static void       AdjustWindowRect(TRect& rect, uint32 style, bool menu);
  428.     static void       AdjustWindowRectEx(TRect& rect, uint32 style,
  429.                                          bool  menu,  uint32 exStyle);
  430.  
  431.     //
  432.     // window and class Words and Longs, window properties
  433.     //
  434.     long              GetClassName(char far* className, int maxCount) const;
  435.     long              GetClassLong(int index) const;
  436.     long              SetClassLong(int index, long newLong);
  437.     uint16            GetClassWord(int index) const;
  438.     uint16            SetClassWord(int index, uint16 newWord);
  439.     long              GetWindowLong(int index) const;
  440.     long              SetWindowLong(int index, long newLong);
  441.     uint16            GetWindowWord(int index) const;
  442.     uint16            SetWindowWord(int index, uint16 newWord);
  443.     int               EnumProps(PROPENUMPROC proc);
  444.     HANDLE            GetProp(uint16 atom) const;
  445.     HANDLE            RemoveProp(uint16 atom) const;
  446.     bool              SetProp(uint16 atom, HANDLE data) const;
  447.     HANDLE            GetProp(const char far* str) const;
  448.     HANDLE            RemoveProp(const char far* str) const;
  449.     bool              SetProp(const char far* str, HANDLE data) const;
  450.  
  451.     //
  452.     // window placement(X,Y) and display
  453.     //
  454.     bool              MoveWindow(int x, int y, int w, int h, bool repaint = false);
  455.     bool              MoveWindow(const TRect& rect, bool repaint = false);
  456.     virtual bool      ShowWindow(int cmdShow);
  457.     void              ShowOwnedPopups(bool show);
  458.     bool              IsWindowVisible() const;
  459.     bool              IsZoomed() const;
  460.     bool              IsIconic() const;
  461.     int               GetWindowTextLength() const;
  462.     int               GetWindowText(char far* str, int maxCount) const;
  463.     void              SetWindowText(const char far* str);
  464.     bool              GetWindowPlacement(WINDOWPLACEMENT* place) const;
  465.     bool              SetWindowPlacement(const WINDOWPLACEMENT* place);
  466.  
  467.     //
  468.     // window positioning(Z), sibling relationships
  469.     //
  470.     void              BringWindowToTop();
  471.     static HWND       GetActiveWindow();
  472.     HWND              SetActiveWindow();
  473.     static HWND       GetDesktopWindow();
  474. #if defined(BI_PLAT_WIN16)
  475.     static HWND       GetSysModalWindow();
  476.     HWND              SetSysModalWindow();
  477. #endif
  478.     HWND              GetLastActivePopup() const;
  479.     HWND              GetNextWindow(uint dirFlag) const;
  480.     HWND              GetTopWindow() const;
  481.     HWND              GetWindow(uint cmd) const;
  482.     bool              SetWindowPos(HWND         hWndInsertAfter,
  483.                                    const TRect& rect,
  484.                                    uint         flags);
  485.     bool              SetWindowPos(HWND hWndInsertAfter,
  486.                                    int x, int y, int w, int h,
  487.                                    uint flags);
  488.  
  489.     //
  490.     // window painting: invalidating, validating & updating
  491.     //
  492.     void              Invalidate(bool erase = true);
  493.     void              InvalidateRect(const TRect& rect, bool erase = true);
  494.     void              InvalidateRgn(HRGN hRgn, bool erase = true);
  495.     void              Validate();
  496.     void              ValidateRect(const TRect& rect);
  497.     void              ValidateRgn(HRGN hRgn);
  498.     void              UpdateWindow();
  499.     bool              FlashWindow(bool invert);
  500.     bool              GetUpdateRect(TRect& rect, bool erase = true) const;
  501.     bool              GetUpdateRgn(TRegion& rgn, bool erase = true) const;
  502.     bool              LockWindowUpdate();
  503.     bool              RedrawWindow(TRect* update,
  504.                                    HRGN   hUpdateRgn,
  505.                                    uint   redrawFlags = RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE);
  506.  
  507.     //
  508.     // scrolling and scrollbars
  509.     //
  510.     int               GetScrollPos(int bar) const;
  511.     int               SetScrollPos(int bar, int pos, bool redraw = true);
  512.     void              GetScrollRange(int bar, int& minPos, int& maxPos) const;
  513.     void              SetScrollRange(int  bar,
  514.                                      int  minPos,
  515.                                      int  maxPos,
  516.                                      bool redraw = true);
  517.     bool              EnableScrollBar(uint sbFlags=SB_BOTH,
  518.                                       uint arrowFlags=ESB_ENABLE_BOTH);
  519.     void              ShowScrollBar(int bar, bool show = true);
  520.     void              ScrollWindow(int              dx,
  521.                                    int              dy,
  522.                                    const TRect far* scroll = 0,
  523.                                    const TRect far* clip = 0);
  524.     void              ScrollWindowEx(int              dx,
  525.                                      int              dy,
  526.                                      const TRect far* scroll = 0,
  527.                                      const TRect far* clip = 0,
  528.                                      HRGN             hUpdateRgn = 0,
  529.                                      TRect far*       update = 0,
  530.                                      uint             flags = 0);
  531.  
  532.     //
  533.     // parent/child with Ids
  534.     //
  535.     int               GetDlgCtrlID() const;
  536.     HWND              GetDlgItem(int childId) const;
  537.     uint              GetDlgItemInt(int   childId,
  538.                                     bool* translated = 0,
  539.                                     bool  isSigned = true) const;
  540.     void              SetDlgItemInt(int  childId,
  541.                                     uint value,
  542.                                     bool isSigned = true) const;
  543.     int               GetDlgItemText(int       childId,
  544.                                      char far* text,
  545.                                      int       max) const;
  546.     void              SetDlgItemText(int childId, const char far* text) const;
  547.     uint              IsDlgButtonChecked(int buttonId) const;
  548.     HWND              GetParent() const;
  549.     bool              IsChild(HWND) const;
  550.     HWND              GetNextDlgGroupItem(HWND hWndCtrl,
  551.                                           bool previous = false) const;
  552.     HWND              GetNextDlgTabItem(HWND HWndCtrl,
  553.                                         bool previous = false) const;
  554.     void              CheckDlgButton(int buttonId, uint check);
  555.     void              CheckRadioButton(int firstButtonId,
  556.                                        int lastButtonId,
  557.                                        int checkButtonId);
  558.  
  559.     //
  560.     // menus and menubar
  561.     //
  562.     HMENU             GetMenu() const;
  563.     HMENU             GetSystemMenu(bool revert = false) const;
  564.     bool              SetMenu(HMENU hMenu);
  565.     bool              HiliteMenuItem(HMENU hMenu, uint idItem, uint hilite);
  566.     void              DrawMenuBar();
  567.  
  568.     //
  569.     // obsolete way to open the global clipboard object. The recomended
  570.     // way is to construct a TClipboard object using the TClipboard(HWND) ctor
  571.     //
  572.     TClipboard&       OpenClipboard();
  573.  
  574.     //
  575.     // timer
  576.     //
  577.     bool              KillTimer(uint timerId);
  578.     uint              SetTimer(uint timerId, uint timeout, TIMERPROC proc = 0);
  579.  
  580.     //
  581.     // caret, cursor, font
  582.     //
  583.     void              CreateCaret(HBITMAP hBitmap);
  584.     void              CreateCaret(bool isGray, int width, int height);
  585.     static uint       GetCaretBlinkTime();
  586.     static void       GetCaretPos(TPoint& point);
  587.     void              HideCaret();
  588.     static void       SetCaretBlinkTime(uint16 milliSecs);
  589.     static void       SetCaretPos(int x, int y);
  590.     static void       SetCaretPos(const TPoint& pos);
  591.     void              ShowCaret();
  592.     static void       DestroyCaret();
  593.     static void       GetCursorPos(TPoint& pos);
  594.     void              SetWindowFont(HFONT font, bool redraw);
  595.     HFONT             GetWindowFont();
  596.  
  597.     //
  598.     // hot keys
  599.     //
  600. #if defined(BI_PLAT_WIN32)
  601.     bool              RegisterHotKey(int  idHotKey,
  602.                                      uint modifiers,
  603.                                      uint virtKey);
  604.     bool              UnregisterHotKey(int idHotKey);
  605. #endif
  606.  
  607.     //
  608.     // Misc
  609.     //
  610.     bool              WinHelp(const char far* helpFile,
  611.                               uint            command,
  612.                               uint32           data);
  613.     int               MessageBox(const char far* text,
  614.                                  const char far* caption = 0,
  615.                                  uint            type = MB_OK);
  616.     HTASK             GetWindowTask() const;
  617.     void              DragAcceptFiles(bool accept);
  618.  
  619.     TCurrentEvent&   GetCurrentEvent() {return GetApplication()->GetCurrentEvent();}
  620.  
  621.   protected:
  622.     //
  623.     // these events are processed by TWindow
  624.     //
  625.     void              EvClose();
  626.     int               EvCreate(CREATESTRUCT far& createStruct);
  627.     void              EvDestroy();
  628.     LRESULT           EvCompareItem(uint ctrlId, COMPAREITEMSTRUCT far& compareInfo);
  629.     void              EvDeleteItem(uint ctrlId, DELETEITEMSTRUCT far& deleteInfo);
  630.     void              EvDrawItem(uint ctrlId, DRAWITEMSTRUCT far& drawInfo);
  631.     void              EvMeasureItem(uint ctrlId, MEASUREITEMSTRUCT far& measureInfo);
  632.     void              EvHScroll(uint scrollCode, uint thumbPos, HWND hWndCtl);
  633.     void              EvVScroll(uint scrollCode, uint thumbPos, HWND hWndCtl);
  634.     void              EvMove(TPoint& clientOrigin);
  635.     void              EvNCDestroy();
  636.     bool              EvQueryEndSession();
  637.     void              EvSize(uint sizeType, TSize& size);
  638.     void              EvLButtonDown(uint modKeys, TPoint& point);
  639.     bool              EvEraseBkgnd(HDC);
  640.     void              EvPaint();
  641.     void              EvSysColorChange();
  642.     LRESULT           EvWin32CtlColor(WPARAM, LPARAM);
  643.  
  644.     void              CmExit();  // CM_EXIT
  645.  
  646.     //
  647.     // input validation message handler
  648.     //
  649.     void              EvChildInvalid(HWND hWnd);
  650.  
  651.     //
  652.     // system messages
  653.     //
  654.     void              EvCommNotify(uint commId, uint status);
  655.     void              EvCompacting(uint compactRatio);
  656.     void              EvDevModeChange(char far* devName);
  657.     void              EvEnable(bool enabled);
  658.     void              EvEndSession(bool endSession);
  659.     void              EvFontChange();
  660.     int               EvPower(uint powerEvent);
  661.     void              EvSysCommand(uint cmdType, TPoint& point);
  662.     void              EvSystemError(uint error);
  663.     void              EvTimeChange();
  664.     void              EvTimer(uint timerId);
  665.     void              EvWinIniChange(char far* section);
  666.  
  667.     //
  668.     // window manager messages
  669.     //
  670.     void              EvActivate(uint active,
  671.                                  bool minimized,
  672.                                  HWND hWndOther /* may be 0 */);
  673.     void              EvActivateApp(bool active, HTASK hTask);
  674.     void              EvCancelMode();
  675.     void              EvGetMinMaxInfo(MINMAXINFO far& minmaxinfo);
  676.     void              EvGetText(uint buffSize, char far* buff);
  677.     uint              EvGetTextLength();
  678.     void              EvIconEraseBkgnd(HDC hDC);
  679.     void              EvKillFocus(HWND hWndGetFocus /* may be 0 */);
  680.     uint              EvMouseActivate(HWND hWndTopLevel,
  681.                                       uint hitTestCode,
  682.                                       uint msg);
  683.  
  684.     // The following five are called under Win32 only
  685.     //
  686.     void              EvInputFocus(bool gainingFocus);
  687.     void              EvOtherWindowCreated(HWND hWndOther);
  688.     void              EvOtherWindowDestroyed(HWND hWndOther);
  689.     void              EvPaintIcon();
  690.     void              EvHotKey(int idHotKey);
  691.  
  692.     void              EvNextDlgCtl(uint hctlOrDir, uint isHCtl);
  693.     void              EvParentNotify(uint event,
  694.                                      uint childHandleOrX,
  695.                                      uint childIDOrY);
  696.     HANDLE            EvQueryDragIcon();
  697.     bool              EvQueryOpen();
  698.     void              EvQueueSync();
  699.     bool              EvSetCursor(HWND hWndCursor,
  700.                                   uint hitTest,
  701.                                   uint mouseMsg);
  702.     void              EvSetFocus(HWND hWndLostFocus /* may be 0 */);
  703.     HFONT             EvGetFont();
  704.     void              EvSetFont(HFONT hFont, bool redraw);
  705.     void              EvSetRedraw(bool redraw);
  706.     void              EvSetText(const char far* text);
  707.     void              EvShowWindow(bool show, uint status);
  708.     void              EvWindowPosChanged(WINDOWPOS far& windowPos);
  709.     void              EvWindowPosChanging(WINDOWPOS far& windowPos);
  710.  
  711.     //
  712.     // keyboard input
  713.     //
  714.     void              EvChar(uint key, uint repeatCount, uint flags);
  715.     void              EvDeadChar(uint deadKey, uint repeatCount, uint flags);
  716.     void              EvKeyDown(uint key, uint repeatCount, uint flags);
  717.     void              EvKeyUp(uint key, uint repeatCount, uint flags);
  718.     void              EvSysChar(uint key, uint repeatCount, uint flags);
  719.     void              EvSysDeadChar(uint key, uint repeatCount, uint flags);
  720.     void              EvSysKeyDown(uint key, uint repeatCount, uint flags);
  721.     void              EvSysKeyUp(uint key, uint repeatCount, uint flags);
  722.  
  723.     //
  724.     // controls
  725.     //
  726.     HBRUSH            EvCtlColor(HDC hDC, HWND hWndChild, uint ctlType);
  727.  
  728.     //
  729.     // mouse input
  730.     //
  731.     void              EvLButtonDblClk(uint modKeys, TPoint& point);
  732.     void              EvLButtonUp(uint modKeys, TPoint& point);
  733.     void              EvMButtonDblClk(uint modKeys, TPoint& point);
  734.     void              EvMButtonDown(uint modKeys, TPoint& point);
  735.     void              EvMButtonUp(uint modKeys, TPoint& point);
  736.     void              EvMouseMove(uint modKeys, TPoint& point);
  737.     void              EvRButtonDblClk(uint modKeys, TPoint& point);
  738.     void              EvRButtonDown(uint modKeys, TPoint& point);
  739.     void              EvRButtonUp(uint modKeys, TPoint& point);
  740.  
  741.     //
  742.     // menu related messages
  743.     //
  744.     void              EvInitMenu(HMENU hMenu);
  745.     void              EvInitMenuPopup(HMENU hPopupMenu,
  746.                                       uint  index,
  747.                                       bool  sysMenu);
  748.     uint              EvMenuChar(uint nChar, uint menuType, HMENU hMenu);
  749.     void              EvMenuSelect(uint menuItemId, uint flags, HMENU hMenu);
  750.  
  751.     //
  752.     // dialog messages
  753.     //
  754.     void              EvEnterIdle(uint source, HWND hWndDlg);
  755.     uint              EvGetDlgCode(MSG far* msg);
  756.  
  757.     //
  758.     // print manager messages
  759.     //
  760.     void              EvSpoolerStatus(uint jobStatus, uint jobsLeft);
  761.  
  762.     //
  763.     // clipboard messages
  764.     //
  765.     void              EvAskCBFormatName(uint bufLen, char far* buffer);
  766.     void              EvChangeCBChain(HWND hWndRemoved, HWND hWndNext);
  767.     void              EvDrawClipboard();
  768.     void              EvDestroyClipboard();
  769.     void              EvHScrollClipboard(HWND hWndCBViewer,
  770.                                          uint scrollCode,
  771.                                          uint pos);
  772.     void              EvPaintClipboard(HWND hWnd, HANDLE hPaintStruct);
  773.     void              EvRenderAllFormats();
  774.     void              EvRenderFormat(uint dataFormat);
  775.     void              EvSizeClipboard(HWND hWndViewer, HANDLE hRect);
  776.     void              EvVScrollClipboard(HWND hWndCBViewer,
  777.                                          uint scrollCode,
  778.                                          uint pos);
  779.  
  780.     //
  781.     // palette manager messages
  782.     //
  783.     void              EvPaletteChanged(HWND hWndPalChg);
  784.     void              EvPaletteIsChanging(HWND hWndPalChg);
  785.     bool              EvQueryNewPalette();
  786.  
  787.     //
  788.     // drag-n-drop messages
  789.     //
  790.     void              EvDropFiles(TDropInfo dropInfo);
  791.  
  792.     //
  793.     // list box messages
  794.     //
  795.     int               EvCharToItem(uint key, HWND hWndListBox, uint caretPos);
  796.     int               EvVKeyToItem(uint key, HWND hWndListBox, uint caretPos);
  797.  
  798.     //
  799.     // non-client messages
  800.     //
  801.     bool              EvNCActivate(bool active);
  802.     uint              EvNCCalcSize(bool calcValidRects, NCCALCSIZE_PARAMS far& params);
  803.     bool              EvNCCreate(CREATESTRUCT far& createStruct);
  804.     uint              EvNCHitTest(TPoint& point);
  805.     void              EvNCLButtonDblClk(uint hitTest, TPoint& point);
  806.     void              EvNCLButtonDown(uint hitTest, TPoint& point);
  807.     void              EvNCLButtonUp(uint hitTest, TPoint& point);
  808.     void              EvNCMButtonDblClk(uint hitTest, TPoint& point);
  809.     void              EvNCMButtonDown(uint hitTest, TPoint& point);
  810.     void              EvNCMButtonUp(uint hitTest, TPoint& point);
  811.     void              EvNCMouseMove(uint hitTest, TPoint& point);
  812.     void              EvNCPaint();
  813.     void              EvNCRButtonDblClk(uint hitTest, TPoint& point);
  814.     void              EvNCRButtonDown(uint hitTest, TPoint& point);
  815.     void              EvNCRButtonUp(uint hitTest, TPoint& point);
  816.  
  817.   protected:
  818.     // Constructor & subsequent initializer for use with virtual derivations
  819.     // Immediate derivitives must call Init() before constructions are done.
  820.     //
  821.     TWindow();
  822.     void              Init(TWindow* parent, const char far* title, TModule* module);
  823.  
  824.     virtual void      GetWindowClass(WNDCLASS& wndClass);
  825.     virtual char far* GetClassName();
  826.  
  827.     virtual void      SetupWindow();
  828.     virtual void      CleanupWindow();
  829.  
  830.     void              DispatchScroll(uint scrollCode, uint thumbPos, HWND hWndCtrl);
  831.  
  832.     void              LoadAcceleratorTable();
  833.     virtual void      RemoveChild(TWindow* child);
  834.  
  835.     TWindow*          GetWindowPtr(HWND hWnd) const;
  836.  
  837.   protected:
  838.     void*        TransferBuffer;
  839.     HACCEL       hAccel;
  840.     TModule*     CursorModule;
  841.     TResId       CursorResId;
  842.     HCURSOR      HCursor;
  843.     uint32       BkgndColor;
  844.  
  845.   private:
  846.     WNDPROC         Thunk;        // Thunk that load 'this' into registers
  847.     TApplication*   Application;  // Application that this window belongs to
  848.     TModule*        Module;       // default module used for getting resources
  849.     uint32          Flags;
  850.     uint16          ZOrder;
  851.     TWindow*        ChildList;
  852.     TWindow*        SiblingList;
  853.     uint32          UniqueId;
  854.  
  855.     static uint32   LastUniqueId;
  856.  
  857.     void              Init(TWindow* parent, TModule* module);
  858.     bool              OrderIsI(TWindow* win, void* position);
  859.     void              AssignZOrder();
  860.     void              AddChild(TWindow* child);
  861.     int               IndexOf(TWindow* child);
  862.     TWindow*          At(int position);
  863.  
  864.     void              SetUniqueId();
  865.  
  866.     //
  867.     // hidden to prevent accidental copying or assignment
  868.     //
  869.     TWindow(const TWindow&);
  870.     TWindow& operator =(const TWindow&);
  871.  
  872.   DECLARE_RESPONSE_TABLE(TWindow);
  873.   DECLARE_STREAMABLE(_OWLCLASS, TWindow, 3);
  874. };  // end of class TWindow
  875.  
  876. //----------------------------------------------------------------------------
  877.  
  878. //
  879. // A TActionFunc defined in window.cpp
  880. //
  881. void DoEnableAutoCreate(TWindow* win, void*);
  882.  
  883. //
  884. // Raw function to retrieve a TWindow pointer given an HWND from the a given
  885. // app, or any app (app==0). Use the TWindow or TApplication member versions
  886. // in new code for more protection.
  887. //
  888. TWindow* _OWLFUNC GetWindowPtr(HWND hWnd, const TApplication* app = 0);
  889. inline TWindow* GetObjectPtr(HWND hWnd) {return ::GetWindowPtr(hWnd);}
  890.  
  891. #if defined(__TRACE) || defined(__WARN)
  892.   ostream& operator <<(ostream& os, const TWindow& w);
  893. #endif
  894.  
  895. //----------------------------------------------------------------------------
  896.  
  897. inline void
  898. TWindow::SendNotification(int id, int notifyCode, HWND hCtl, uint msg) {
  899. #if defined(BI_PLAT_WIN32)
  900.   HandleMessage(msg, MAKEWPARAM(id, notifyCode), LPARAM(hCtl));
  901. #else
  902.   HandleMessage(msg, id, MAKELPARAM(hCtl, notifyCode));
  903. #endif
  904. }
  905.  
  906. //
  907. // HWND wrappers
  908. //
  909. inline LRESULT
  910. TWindow::SendDlgItemMessage(int     childId, uint   msg,
  911.                             WPARAM wParam,  LPARAM lParam) {
  912.   return ::SendDlgItemMessage(HWindow, childId, msg, wParam, lParam);
  913. }
  914.  
  915. inline bool
  916. TWindow::PostMessage(uint msg, WPARAM wParam, LPARAM lParam) {
  917.   return ::PostMessage(HWindow, msg, wParam, lParam);
  918. }
  919.  
  920. inline HWND
  921. TWindow::GetCapture() {
  922.   return ::GetCapture();
  923. }
  924.  
  925. inline HWND
  926. TWindow::SetCapture() {
  927.   return ::SetCapture(HWindow);
  928. }
  929.  
  930. inline void
  931. TWindow::ReleaseCapture() {
  932.   ::ReleaseCapture();
  933. }
  934.  
  935. inline HWND
  936. TWindow::GetFocus() {
  937.   return ::GetFocus();
  938. }
  939.  
  940. inline HWND
  941. TWindow::SetFocus() {
  942.   return ::SetFocus(HWindow);
  943. }
  944.  
  945. inline bool
  946. TWindow::IsWindowEnabled() const {
  947.   return ::IsWindowEnabled(HWindow);
  948. }
  949.  
  950. inline bool
  951. TWindow::EnableWindow(bool enable) {
  952.   return ::EnableWindow(HWindow, enable);
  953. }
  954.  
  955. inline void
  956. TWindow::SetRedraw(bool redraw) {
  957.   SendMessage(WM_SETREDRAW, redraw);
  958. }
  959.  
  960. inline void
  961. TWindow::ScreenToClient(TPoint& point) const {
  962.   ::ScreenToClient(HWindow, &point);
  963. }
  964.  
  965. inline void
  966. TWindow::MapWindowPoints(HWND hWndTo, TPoint* points, int count) const {
  967.   ::MapWindowPoints(HWindow, hWndTo, points, count);
  968. }
  969.  
  970. inline void
  971. TWindow::GetClientRect(TRect& rect) const {
  972.   ::GetClientRect(HWindow, &rect);
  973. }
  974.  
  975. inline TRect TWindow::GetClientRect() const {
  976.   TRect  rect;
  977.   ::GetClientRect(HWindow, &rect);
  978.   return rect;
  979. }
  980.  
  981. inline HWND
  982. TWindow::WindowFromPoint(const TPoint& point) {
  983.   return ::WindowFromPoint(point);
  984. }
  985.  
  986. inline HWND
  987. TWindow::ChildWindowFromPoint(const TPoint& point) const {
  988.   return ::ChildWindowFromPoint(HWindow, point);
  989. }
  990.  
  991. inline void
  992. TWindow::ClientToScreen(TPoint& point) const {
  993.   ::ClientToScreen(HWindow, &point);
  994. }
  995.  
  996. inline void
  997. TWindow::GetWindowRect(TRect& rect) const {
  998.   ::GetWindowRect(HWindow, &rect);
  999. }
  1000.  
  1001. inline TRect
  1002. TWindow::GetWindowRect() const {
  1003.   TRect  rect;
  1004.   ::GetWindowRect(HWindow, &rect);
  1005.   return rect;
  1006. }
  1007.  
  1008. inline void
  1009. TWindow::AdjustWindowRect(TRect& rect, uint32 style, bool menu) {
  1010.   ::AdjustWindowRect(&rect, style, menu);
  1011. }
  1012.  
  1013. inline void
  1014. TWindow::AdjustWindowRectEx(TRect& rect, uint32 style, bool menu, uint32 exStyle) {
  1015.   ::AdjustWindowRectEx(&rect, style, menu, exStyle);
  1016. }
  1017.  
  1018.  
  1019. //
  1020. // window and class Words and Longs, window properties
  1021. //
  1022. inline long
  1023. TWindow::GetClassName(char far* className, int maxCount) const {
  1024.   return ::GetClassName(HWindow, className, maxCount);
  1025. }
  1026.  
  1027. inline long
  1028. TWindow::GetClassLong(int index) const {
  1029.   return ::GetClassLong(HWindow, index);
  1030. }
  1031.  
  1032. inline long
  1033. TWindow::SetClassLong(int index, long newLong) {
  1034.   return ::SetClassLong(HWindow, index, newLong);
  1035. }
  1036.  
  1037. inline uint16
  1038. TWindow::GetClassWord(int index) const {
  1039.   return ::GetClassWord(HWindow, index);
  1040. }
  1041.  
  1042. inline uint16
  1043. TWindow::SetClassWord(int index, uint16 newWord) {
  1044.   return ::SetClassWord(HWindow, index, newWord);
  1045. }
  1046.  
  1047. inline long
  1048. TWindow::GetWindowLong(int index) const {
  1049.   return ::GetWindowLong(HWindow, index);
  1050. }
  1051.  
  1052. inline long
  1053. TWindow::SetWindowLong(int index, long newLong) {
  1054.   return ::SetWindowLong(HWindow, index, newLong);
  1055. }
  1056.  
  1057. inline uint16
  1058. TWindow::GetWindowWord(int index) const {
  1059.   return ::GetWindowWord(HWindow, index);
  1060. }
  1061.  
  1062. inline uint16
  1063. TWindow::SetWindowWord(int index, uint16 newWord) {
  1064.   return ::SetWindowWord(HWindow, index, newWord);
  1065. }
  1066.  
  1067. inline int
  1068. TWindow::EnumProps(PROPENUMPROC proc) {
  1069.   return ::EnumProps(HWindow, proc);
  1070. }
  1071.  
  1072. inline HANDLE
  1073. TWindow::GetProp(uint16 atom) const {
  1074.   return :: GetProp(HWindow, (LPCSTR)(uint32)atom);
  1075. }
  1076.  
  1077. inline HANDLE
  1078. TWindow::RemoveProp(uint16 atom) const {
  1079.   return :: RemoveProp(HWindow, (LPCSTR)(uint32)atom);
  1080. }
  1081.  
  1082. inline bool
  1083. TWindow::SetProp(uint16 atom, HANDLE data) const {
  1084.   return :: SetProp(HWindow, (LPCSTR)(uint32)atom, data);
  1085. }
  1086.  
  1087. inline HANDLE
  1088. TWindow::GetProp(const char far* str) const {
  1089.   return ::GetProp(HWindow, str);
  1090. }
  1091.  
  1092. inline HANDLE
  1093. TWindow::RemoveProp(const char far* str) const {
  1094.   return ::RemoveProp(HWindow, str);
  1095. }
  1096.  
  1097. inline bool
  1098. TWindow::SetProp(const char far* str, HANDLE data) const {
  1099.   return ::SetProp(HWindow, str, data);
  1100. }
  1101.  
  1102. inline bool
  1103. TWindow::MoveWindow(int x, int y, int w, int h, bool repaint) {
  1104.   return ::MoveWindow(HWindow, x, y, w, h, repaint);
  1105. }
  1106.  
  1107. inline bool
  1108. TWindow::MoveWindow(const TRect& rect, bool repaint) {
  1109.   return ::MoveWindow(HWindow, rect.left, rect.top,
  1110.                       rect.Width(), rect.Height(), repaint);
  1111. }
  1112.  
  1113. inline bool
  1114. TWindow::ShowWindow(int cmdShow) {
  1115.   return ::ShowWindow(HWindow, cmdShow);
  1116. }
  1117.  
  1118. inline void
  1119. TWindow::ShowOwnedPopups(bool show) {
  1120.   ::ShowOwnedPopups(HWindow, show);
  1121. }
  1122.  
  1123. inline bool
  1124. TWindow::IsWindowVisible() const {
  1125.   return ::IsWindowVisible(HWindow);
  1126. }
  1127.  
  1128. inline bool
  1129. TWindow::IsZoomed() const {
  1130.   return ::IsZoomed(HWindow);
  1131. }
  1132.  
  1133. inline bool
  1134. TWindow::IsIconic() const {
  1135.   return ::IsIconic(HWindow);
  1136. }
  1137.  
  1138. inline int
  1139. TWindow::GetWindowTextLength() const {
  1140.   return ::GetWindowTextLength(HWindow);
  1141. }
  1142.  
  1143. inline int
  1144. TWindow::GetWindowText(char far* str, int maxCount) const {
  1145.   return ::GetWindowText(HWindow, str, maxCount);
  1146. }
  1147.  
  1148. inline void
  1149. TWindow::SetWindowText(const char far* str) {
  1150.   ::SetWindowText(HWindow, str);
  1151. }
  1152.  
  1153. inline bool
  1154. TWindow::GetWindowPlacement(WINDOWPLACEMENT* place) const {
  1155.   return ::GetWindowPlacement(HWindow, place);
  1156. }
  1157.  
  1158. inline bool
  1159. TWindow::SetWindowPlacement(const WINDOWPLACEMENT* place) {
  1160.   return ::SetWindowPlacement(HWindow, place);
  1161. }
  1162.  
  1163. inline void
  1164. TWindow::BringWindowToTop() {
  1165.   ::BringWindowToTop(HWindow);
  1166. }
  1167.  
  1168. inline HWND
  1169. TWindow::GetActiveWindow() {
  1170.   return ::GetActiveWindow();
  1171. }
  1172.  
  1173. inline HWND
  1174. TWindow::SetActiveWindow() {
  1175.   return ::SetActiveWindow(HWindow);
  1176. }
  1177.  
  1178. inline HWND
  1179. TWindow::GetDesktopWindow() {
  1180.   return ::GetDesktopWindow();
  1181. }
  1182.  
  1183. #if defined(BI_PLAT_WIN16)
  1184. inline HWND
  1185. TWindow::GetSysModalWindow() {
  1186.   return ::GetSysModalWindow();
  1187. }
  1188.  
  1189. inline HWND
  1190. TWindow::SetSysModalWindow() {
  1191.   return ::SetSysModalWindow(HWindow);
  1192. }
  1193.  
  1194. inline HWND
  1195. TWindow::GetNextWindow(uint flag) const {
  1196.   return ::GetNextWindow(HWindow, flag);
  1197. }
  1198. #endif
  1199.  
  1200. inline HWND
  1201. TWindow::GetLastActivePopup() const {
  1202.   return ::GetLastActivePopup(HWindow);
  1203. }
  1204.  
  1205. inline HWND
  1206. TWindow::GetWindow(uint flag) const {
  1207.   return ::GetWindow(HWindow, flag);
  1208. }
  1209.  
  1210. inline HWND
  1211. TWindow::GetTopWindow() const {
  1212.   return ::GetTopWindow(HWindow);
  1213. }
  1214.  
  1215. inline bool
  1216. TWindow::SetWindowPos(HWND hWndInsertAfter, const TRect& rect, uint flags) {
  1217.   return ::SetWindowPos(HWindow, hWndInsertAfter, rect.left, rect.top,
  1218.                         rect.Width(), rect.Height(), flags);
  1219. }
  1220.  
  1221. inline bool
  1222. TWindow::SetWindowPos(HWND hWndInsertAfter,
  1223.                       int x, int y, int w, int h,
  1224.                       uint flags) {
  1225.   return ::SetWindowPos(HWindow, hWndInsertAfter, x, y, w, h, flags);
  1226. }
  1227.  
  1228. inline void
  1229. TWindow::Invalidate(bool erase) {
  1230.   ::InvalidateRect(HWindow, 0, erase);
  1231. }
  1232.  
  1233. inline void
  1234. TWindow::InvalidateRect(const TRect& rect, bool erase) {
  1235.   ::InvalidateRect(HWindow, &rect, erase);
  1236. }
  1237.  
  1238. inline void
  1239. TWindow::InvalidateRgn(HRGN hRgn, bool erase) {
  1240.   ::InvalidateRgn(HWindow, hRgn, erase);
  1241. }
  1242.  
  1243. inline void
  1244. TWindow::Validate() {
  1245.   ::ValidateRect(HWindow, 0);
  1246. }
  1247.  
  1248. inline void
  1249. TWindow::ValidateRect(const TRect& rect) {
  1250.   ::ValidateRect(HWindow, &rect);
  1251. }
  1252.  
  1253. inline void
  1254. TWindow::ValidateRgn(HRGN hRgn) {
  1255.   ::ValidateRgn(HWindow, hRgn);
  1256. }
  1257.  
  1258. inline void
  1259. TWindow::UpdateWindow() {
  1260.   ::UpdateWindow(HWindow);
  1261. }
  1262.  
  1263. inline bool
  1264. TWindow::FlashWindow(bool invert) {
  1265.   return ::FlashWindow(HWindow, invert);
  1266. }
  1267.  
  1268. inline bool
  1269. TWindow::GetUpdateRect(TRect& rect, bool erase) const {
  1270.   return ::GetUpdateRect(HWindow, &rect, erase);
  1271. }
  1272.  
  1273. inline bool
  1274. TWindow::LockWindowUpdate() {
  1275.   return ::LockWindowUpdate(HWindow);
  1276. }
  1277.  
  1278. inline bool
  1279. TWindow::RedrawWindow(TRect* update, HRGN hUpdateRgn, uint redraw) {
  1280.   return ::RedrawWindow(HWindow, update, hUpdateRgn, redraw);
  1281. }
  1282.  
  1283. inline int
  1284. TWindow::GetScrollPos(int bar) const {
  1285.   return ::GetScrollPos(HWindow, bar);
  1286. }
  1287.  
  1288. inline int
  1289. TWindow::SetScrollPos(int bar, int pos, bool redraw) {
  1290.   return ::SetScrollPos(HWindow, bar, pos, redraw);
  1291. }
  1292.  
  1293. inline void
  1294. TWindow::GetScrollRange(int bar, int& minPos, int& maxPos) const {
  1295.   ::GetScrollRange(HWindow, bar, &minPos, &maxPos);
  1296. }
  1297.  
  1298. inline void
  1299. TWindow::SetScrollRange(int bar, int minPos, int maxPos, bool redraw) {
  1300.   ::SetScrollRange(HWindow, bar, minPos, maxPos, redraw);
  1301. }
  1302.  
  1303. inline bool
  1304. TWindow::EnableScrollBar(uint sbFlags, uint arrowFlags) {
  1305.   return ::EnableScrollBar(HWindow, sbFlags, arrowFlags);
  1306. }
  1307.  
  1308. inline void TWindow::ShowScrollBar(int bar, bool show) {
  1309.   ::ShowScrollBar(HWindow, bar, show);
  1310. }
  1311.  
  1312. inline void
  1313. TWindow::ScrollWindow(int              dx,
  1314.                       int              dy,
  1315.                       const TRect far* scroll,
  1316.                       const TRect far* clip) {
  1317.   ::ScrollWindow(HWindow, dx, dy, scroll, clip);
  1318. }
  1319.  
  1320. inline void
  1321. TWindow::ScrollWindowEx(int              dx,
  1322.                         int              dy,
  1323.                         const TRect far* scroll,
  1324.                         const TRect far* clip,
  1325.                         HRGN             hUpdateRgn,
  1326.                         TRect far*       update,
  1327.                         uint             flags) {
  1328.   ::ScrollWindowEx(HWindow, dx, dy, scroll, clip, hUpdateRgn, update, flags);
  1329. }
  1330.  
  1331. inline int
  1332. TWindow::GetDlgCtrlID() const {
  1333.   return ::GetDlgCtrlID(HWindow);
  1334. }
  1335.  
  1336. inline HWND
  1337. TWindow::GetDlgItem(int childId) const {
  1338.   return ::GetDlgItem(HWindow, childId);
  1339. }
  1340.  
  1341. inline uint
  1342. TWindow::GetDlgItemInt(int childId, bool* translated, bool isSigned) const {
  1343.   return ::GetDlgItemInt(HWindow, childId, (int*)translated, isSigned);
  1344. }
  1345.  
  1346. inline void
  1347. TWindow::SetDlgItemInt(int childId, uint value, bool isSigned) const {
  1348.   ::SetDlgItemInt(HWindow, childId, value, isSigned);
  1349. }
  1350.  
  1351. inline int
  1352. TWindow::GetDlgItemText(int childId, char far* text, int max) const {
  1353.   return ::GetDlgItemText(HWindow, childId, text, max);
  1354. }
  1355.  
  1356. inline void
  1357. TWindow::SetDlgItemText(int childId, const char far* text) const {
  1358.   ::SetDlgItemText(HWindow, childId, text);
  1359. }
  1360.  
  1361. inline uint
  1362. TWindow::IsDlgButtonChecked(int buttonId) const {
  1363.   return ::IsDlgButtonChecked(HWindow, buttonId);
  1364. }
  1365.  
  1366. inline HWND
  1367. TWindow::GetParent() const {
  1368.   return ::GetParent(HWindow);
  1369. }
  1370.  
  1371. inline bool
  1372. TWindow::IsChild(HWND hWnd) const {
  1373.   return ::IsChild(HWindow, hWnd);
  1374. }
  1375.  
  1376. inline HWND
  1377. TWindow::GetNextDlgGroupItem(HWND hWndCtrl, bool previous) const {
  1378.   return ::GetNextDlgGroupItem(HWindow, hWndCtrl, previous);
  1379. }
  1380.  
  1381. inline HWND
  1382. TWindow::GetNextDlgTabItem(HWND hWndCtrl, bool previous) const {
  1383.   return ::GetNextDlgTabItem(HWindow, hWndCtrl, previous);
  1384. }
  1385.  
  1386. inline void
  1387. TWindow::CheckDlgButton(int buttonId, uint check) {
  1388.   ::CheckDlgButton(HWindow, buttonId, check);
  1389. }
  1390.  
  1391. inline void
  1392. TWindow::CheckRadioButton(int firstButtonId, int lastButtonId, int checkButtonId) {
  1393.   ::CheckRadioButton(HWindow, firstButtonId, lastButtonId, checkButtonId);
  1394. }
  1395.  
  1396. inline HMENU
  1397. TWindow::GetMenu() const {
  1398.   return ::GetMenu(HWindow);
  1399. }
  1400.  
  1401. inline HMENU
  1402. TWindow::GetSystemMenu(bool revert) const {
  1403.   return ::GetSystemMenu(HWindow, revert);
  1404. }
  1405.  
  1406. inline bool
  1407. TWindow::SetMenu(HMENU hMenu) {
  1408.   return ::SetMenu(HWindow, hMenu);
  1409. }
  1410.  
  1411. inline bool
  1412. TWindow::HiliteMenuItem(HMENU hMenu, uint idItem, uint hilite) {
  1413.   return ::HiliteMenuItem(HWindow, hMenu, idItem, hilite);
  1414. }
  1415.  
  1416. inline void
  1417. TWindow::DrawMenuBar() {
  1418.   ::DrawMenuBar(HWindow);
  1419. }
  1420.  
  1421. inline TClipboard&
  1422. TWindow::OpenClipboard() {
  1423.   TClipboard& clip = TClipboard::GetClipboard();
  1424.  
  1425.   clip.OpenClipboard(HWindow);
  1426.   return clip;
  1427. }
  1428.  
  1429. inline bool
  1430. TWindow::KillTimer(uint timerId) {
  1431.   return ::KillTimer(HWindow, timerId);
  1432. }
  1433.  
  1434. inline uint
  1435. TWindow::SetTimer(uint timerId, uint timeout, TIMERPROC proc) {
  1436.   return ::SetTimer(HWindow, timerId, timeout, proc);
  1437. }
  1438.  
  1439. inline void
  1440. TWindow::CreateCaret(HBITMAP hBitmap) {
  1441.   ::CreateCaret(HWindow, hBitmap, 0, 0);
  1442. }
  1443.  
  1444. inline void
  1445. TWindow::CreateCaret(bool isGray, int width, int height) {
  1446.   ::CreateCaret(HWindow, (HBITMAP)(isGray ? 1 : 0), width, height);
  1447. }
  1448.  
  1449. inline void
  1450. TWindow::DestroyCaret() {
  1451.   ::DestroyCaret();
  1452. }
  1453.  
  1454. inline uint
  1455. TWindow::GetCaretBlinkTime() {
  1456.   return ::GetCaretBlinkTime();
  1457. }
  1458.  
  1459. inline void
  1460. TWindow::GetCaretPos(TPoint& point) {
  1461.   ::GetCaretPos(&point);
  1462. }
  1463.  
  1464. inline void
  1465. TWindow::HideCaret() {
  1466.   ::HideCaret(HWindow);
  1467. }
  1468.  
  1469. inline void
  1470. TWindow::SetCaretBlinkTime(uint16 milliSecs) {
  1471.   ::SetCaretBlinkTime(milliSecs);
  1472. }
  1473.  
  1474. inline void
  1475. TWindow::SetCaretPos(int x, int y) {
  1476.   ::SetCaretPos(x, y);
  1477. }
  1478.  
  1479. inline void
  1480. TWindow::SetCaretPos(const TPoint& pos) {
  1481.   ::SetCaretPos(pos.x, pos.y);
  1482. }
  1483.  
  1484. inline void
  1485. TWindow::ShowCaret() {
  1486.   ::ShowCaret(HWindow);
  1487. }
  1488.  
  1489. inline void
  1490. TWindow::GetCursorPos(TPoint& pos) {
  1491.   ::GetCursorPos(&pos);
  1492. }
  1493.  
  1494. inline void
  1495. TWindow::SetWindowFont(HFONT font, bool redraw) {
  1496.   HandleMessage(WM_SETFONT, WPARAM(font), redraw);
  1497. }
  1498.  
  1499. inline HFONT
  1500. TWindow::GetWindowFont() {
  1501.   return (HFONT)HandleMessage(WM_GETFONT);
  1502. }
  1503.  
  1504. #if defined(BI_PLAT_WIN32)
  1505. inline bool
  1506. TWindow::RegisterHotKey(int idHotKey, uint modifiers, uint virtKey) {
  1507.   return ::RegisterHotKey(HWindow, idHotKey, modifiers, virtKey);
  1508. }
  1509.  
  1510. inline bool
  1511. TWindow::UnregisterHotKey(int idHotKey) {
  1512.   return ::UnregisterHotKey(HWindow, idHotKey);
  1513. }
  1514. #endif
  1515.  
  1516. inline bool
  1517. TWindow::WinHelp(const char far* helpFile, uint command, uint32 data) {
  1518.   return ::WinHelp(HWindow, helpFile, command, data);
  1519. }
  1520.  
  1521. inline HTASK
  1522. TWindow::GetWindowTask() const {
  1523. #if defined(BI_PLAT_WIN32)
  1524.   return (HANDLE)::GetWindowThreadProcessId(HWindow, 0);
  1525. #else
  1526.   return ::GetWindowTask(HWindow);
  1527. #endif
  1528. }
  1529.  
  1530. inline void
  1531. TWindow::DragAcceptFiles(bool accept) {
  1532.   ::DragAcceptFiles(HWindow, accept);
  1533. }
  1534.  
  1535. inline TWindow* TWindow::GetWindowPtr(HWND hWnd) const {
  1536.   return ::GetWindowPtr(hWnd, GetApplication());
  1537. }
  1538.  
  1539. //
  1540. // inline member functions that call DefWindowProc()
  1541. //
  1542. inline void    TWindow::EvActivate(uint active,
  1543.                                    bool minimized,
  1544.                                    HWND hWndOther /*may be 0*/)
  1545.                    {DefaultProcessing();}
  1546. inline void    TWindow::EvActivateApp(bool active, HTASK hTask /* threadId*/)
  1547.                    {DefaultProcessing();}
  1548. inline void    TWindow::EvAskCBFormatName(uint bufLen, char far* buffer)
  1549.                    {DefaultProcessing();}
  1550. inline void    TWindow::EvCancelMode()
  1551.                    {DefaultProcessing();}
  1552. inline void    TWindow::EvChangeCBChain(HWND hWndRemoved, HWND hWndNext)
  1553.                    {DefaultProcessing();}
  1554. inline void    TWindow::EvChar(uint key, uint repeatCount, uint flags)
  1555.                    {DefaultProcessing();}
  1556. inline int     TWindow::EvCharToItem(uint key, HWND hWndListBox, uint caretPos)
  1557.                    {return (int)DefaultProcessing();}
  1558. inline int     TWindow::EvVKeyToItem(uint key, HWND hWndListBox, uint caretPos)
  1559.                    {return (int)DefaultProcessing();}
  1560. inline void    TWindow::EvCommNotify(uint commId, uint status)
  1561.                    {DefaultProcessing();}
  1562. inline void    TWindow::EvCompacting(uint compactRatio)
  1563.                    {DefaultProcessing();}
  1564. inline HBRUSH  TWindow::EvCtlColor(HDC hDC, HWND hWndChild, uint ctlType)
  1565.                    {return (HBRUSH)DefaultProcessing();}
  1566. inline void    TWindow::EvDeadChar(uint deadKey, uint repeatCount, uint flags)
  1567.                    {DefaultProcessing();}
  1568. inline void    TWindow::EvDestroyClipboard()
  1569.                    {DefaultProcessing();}
  1570. inline void    TWindow::EvDevModeChange(char far*)
  1571.                    {DefaultProcessing();}
  1572. inline void    TWindow::EvDropFiles(TDropInfo)
  1573.                    {DefaultProcessing();}
  1574. inline void    TWindow::EvDrawClipboard()
  1575.                    {DefaultProcessing();}
  1576. inline void    TWindow::EvEnable(bool enabled)
  1577.                    {DefaultProcessing();}
  1578. inline void    TWindow::EvEndSession(bool endSession)
  1579.                    {DefaultProcessing();}
  1580. inline void    TWindow::EvEnterIdle(uint source, HWND hWndDlg)
  1581.                    {DefaultProcessing();}
  1582. inline void    TWindow::EvFontChange()
  1583.                    {DefaultProcessing();}
  1584. inline uint    TWindow::EvGetDlgCode(MSG far*)
  1585.                    {return (uint)DefaultProcessing();}
  1586. inline HFONT   TWindow::EvGetFont()
  1587.                    {return (HFONT)DefaultProcessing();}
  1588. inline void    TWindow::EvGetMinMaxInfo(MINMAXINFO far&)
  1589.                    {DefaultProcessing();}
  1590. inline void    TWindow::EvGetText(uint buffSize, char far* buff)
  1591.                    {DefaultProcessing();}
  1592. inline uint    TWindow::EvGetTextLength()
  1593.                    {return (uint)DefaultProcessing();}
  1594. inline void    TWindow::EvHotKey(int idHotKey)
  1595.                    {DefaultProcessing();}
  1596. inline void    TWindow::EvInputFocus(bool gainingFocus)
  1597.                    {DefaultProcessing();}
  1598. inline void    TWindow::EvHScrollClipboard(HWND hWndCBViewer,
  1599.                                            uint scrollCode,
  1600.                                            uint pos)
  1601.                    {DefaultProcessing();}
  1602. inline void    TWindow::EvIconEraseBkgnd(HDC)
  1603.                    {DefaultProcessing();}
  1604. inline void    TWindow::EvInitMenu(HMENU)
  1605.                    {DefaultProcessing();}
  1606. inline void    TWindow::EvKeyDown(uint key, uint repeatCount, uint flags)
  1607.                    {DefaultProcessing();}
  1608. inline void    TWindow::EvKeyUp(uint key, uint repeatCount, uint flags)
  1609.                    {DefaultProcessing();}
  1610. inline void    TWindow::EvLButtonDblClk(uint modKeys, TPoint&)
  1611.                    {DefaultProcessing();}
  1612. inline void    TWindow::EvLButtonUp(uint modKeys, TPoint&)
  1613.                    {DefaultProcessing();}
  1614. inline void    TWindow::EvMButtonDblClk(uint modKeys, TPoint&)
  1615.                    {DefaultProcessing();}
  1616. inline void    TWindow::EvMButtonDown(uint modKeys, TPoint&)
  1617.                    {DefaultProcessing();}
  1618. inline void    TWindow::EvMButtonUp(uint modKeys, TPoint&)
  1619.                    {DefaultProcessing();}
  1620. inline uint    TWindow::EvMenuChar(uint nChar, uint menuType, HMENU hMenu)
  1621.                    {return (uint)DefaultProcessing();}
  1622. inline void    TWindow::EvMenuSelect(uint menuItemId, uint flags, HMENU hMenu)
  1623.                    {DefaultProcessing();}
  1624. inline uint    TWindow::EvMouseActivate(HWND hWndTopLevel, uint hitTestCode, uint msg)
  1625.                    {return (uint)DefaultProcessing();}
  1626. inline void    TWindow::EvMouseMove(uint modKeys, TPoint&)
  1627.                    {DefaultProcessing();}
  1628. inline bool    TWindow::EvNCActivate(bool active)
  1629.                    {return (bool)DefaultProcessing();}
  1630. inline uint    TWindow::EvNCCalcSize(bool calcValidRects, NCCALCSIZE_PARAMS far&)
  1631.                    {return (uint)DefaultProcessing();}
  1632. inline bool    TWindow::EvNCCreate(CREATESTRUCT far&)
  1633.                    {return (bool)DefaultProcessing();}
  1634. inline uint    TWindow::EvNCHitTest(TPoint&)
  1635.                    {return (uint)DefaultProcessing();}
  1636. inline void    TWindow::EvNCLButtonDblClk(uint hitTest, TPoint&)
  1637.                    {DefaultProcessing();}
  1638. inline void    TWindow::EvNCLButtonDown(uint hitTest, TPoint&)
  1639.                    {DefaultProcessing();}
  1640. inline void    TWindow::EvNCLButtonUp(uint hitTest, TPoint&)
  1641.                    {DefaultProcessing();}
  1642. inline void    TWindow::EvNCMButtonDblClk(uint hitTest, TPoint&)
  1643.                    {DefaultProcessing();}
  1644. inline void    TWindow::EvNCMButtonDown(uint hitTest, TPoint&)
  1645.                    {DefaultProcessing();}
  1646. inline void    TWindow::EvNCMButtonUp(uint hitTest, TPoint&)
  1647.                    {DefaultProcessing();}
  1648. inline void    TWindow::EvNCMouseMove(uint hitTest, TPoint&)
  1649.                    {DefaultProcessing();}
  1650. inline void    TWindow::EvNCPaint()
  1651.                    {DefaultProcessing();}
  1652. inline void    TWindow::EvNCRButtonDblClk(uint hitTest, TPoint&)
  1653.                    {DefaultProcessing();}
  1654. inline void    TWindow::EvNCRButtonDown(uint hitTest, TPoint&)
  1655.                    {DefaultProcessing();}
  1656. inline void    TWindow::EvNCRButtonUp(uint hitTest, TPoint&)
  1657.                    {DefaultProcessing();}
  1658. inline void    TWindow::EvNextDlgCtl(uint hctlOrDir, uint isHCtl)
  1659.                    {DefaultProcessing();}
  1660. inline void    TWindow::EvOtherWindowCreated(HWND hWndOther)
  1661.                    {DefaultProcessing();}
  1662. inline void    TWindow::EvOtherWindowDestroyed(HWND hWndOther)
  1663.                    {DefaultProcessing();}
  1664. inline void    TWindow::EvPaintIcon()
  1665.                    {DefaultProcessing();}
  1666. inline void    TWindow::EvPaintClipboard(HWND, HANDLE hPaintStruct)
  1667.                    {DefaultProcessing();}
  1668. inline void    TWindow::EvPaletteChanged(HWND hWndPalChg)
  1669.                    {DefaultProcessing();}
  1670. inline void    TWindow::EvPaletteIsChanging(HWND hWndPalChg)
  1671.                    {DefaultProcessing();}
  1672. inline void    TWindow::EvParentNotify(uint event,
  1673.                                        uint childHandleOrX,
  1674.                                        uint childIDOrY)
  1675.                    {DefaultProcessing();}
  1676. inline int     TWindow::EvPower(uint)
  1677.                    {return (int)DefaultProcessing();}
  1678. inline void    TWindow::EvSysCommand(uint cmdType, TPoint&)
  1679.                    {DefaultProcessing();}
  1680. inline HANDLE  TWindow::EvQueryDragIcon()
  1681.                    {return (HANDLE)DefaultProcessing();}
  1682. inline bool    TWindow::EvQueryNewPalette()
  1683.                    {return (bool)DefaultProcessing();}
  1684. inline bool    TWindow::EvQueryOpen()
  1685.                    {return (bool)DefaultProcessing();}
  1686. inline void    TWindow::EvQueueSync()
  1687.                    {DefaultProcessing();}
  1688. inline void    TWindow::EvRenderAllFormats()
  1689.                    {DefaultProcessing();}
  1690. inline void    TWindow::EvRenderFormat(uint dataFormat)
  1691.                    {DefaultProcessing();}
  1692. inline void    TWindow::EvRButtonDblClk(uint modKeys, TPoint&)
  1693.                    {DefaultProcessing();}
  1694. inline void    TWindow::EvRButtonDown(uint modKeys, TPoint&)
  1695.                    {DefaultProcessing();}
  1696. inline void    TWindow::EvRButtonUp(uint modKeys, TPoint&)
  1697.                    {DefaultProcessing();}
  1698. inline void    TWindow::EvSetFocus(HWND hWndLostFocus)
  1699.                    {DefaultProcessing();}
  1700. inline void    TWindow::EvSetFont(HFONT, bool)
  1701.                    {DefaultProcessing();}
  1702. inline void    TWindow::EvSetRedraw(bool)
  1703.                    {DefaultProcessing();}
  1704. inline void    TWindow::EvSetText(const char far*)
  1705.                    {DefaultProcessing();}
  1706. inline void    TWindow::EvShowWindow(bool show, uint status)
  1707.                    {DefaultProcessing();}
  1708. inline void    TWindow::EvSizeClipboard(HWND hWndViewer, HANDLE hRect)
  1709.                    {DefaultProcessing();}
  1710. inline void    TWindow::EvSpoolerStatus(uint jobStatus, uint jobsLeft)
  1711.                    {DefaultProcessing();}
  1712. inline void    TWindow::EvSysChar(uint key, uint repeatCount, uint flags)
  1713.                    {DefaultProcessing();}
  1714. inline void    TWindow::EvSysDeadChar(uint key, uint repeatCount, uint flags)
  1715.                    {DefaultProcessing();}
  1716. inline void    TWindow::EvSysKeyDown(uint key, uint repeatCount, uint flags)
  1717.                    {DefaultProcessing();}
  1718. inline void    TWindow::EvSysKeyUp(uint key, uint repeatCount, uint flags)
  1719.                    {DefaultProcessing();}
  1720. inline void    TWindow::EvSystemError(uint error)
  1721.                    {DefaultProcessing();}
  1722. inline void    TWindow::EvTimeChange()
  1723.                    {DefaultProcessing();}
  1724. inline void    TWindow::EvTimer(uint timerId)
  1725.                    {DefaultProcessing();}
  1726. inline void    TWindow::EvWinIniChange(char far* section)
  1727.                    {DefaultProcessing();}
  1728. inline void    TWindow::EvVScrollClipboard(HWND hWndCBViewer,
  1729.                                            uint scrollCode,
  1730.                                            uint pos)
  1731.                    {DefaultProcessing();}
  1732. inline void    TWindow::EvWindowPosChanged(WINDOWPOS far& windowPos)
  1733.                    {DefaultProcessing();}
  1734. inline void    TWindow::EvWindowPosChanging(WINDOWPOS far& windowPos)
  1735.                    {DefaultProcessing();}
  1736.  
  1737. #endif  // OWL_WINDOW_H
  1738.