OWLNext    7.0
Borland's Object Windows Library for the modern age
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
mdichild.h
Go to the documentation of this file.
1//----------------------------------------------------------------------------
2// ObjectWindows
3// Copyright (c) 1991, 1996 by Borland International, All Rights Reserved
4//
5/// \file
6/// Definition of class TMDIChild.
7//----------------------------------------------------------------------------
8
9#if !defined(OWL_MDICHILD_H)
10#define OWL_MDICHILD_H
11
12#include <owl/private/defs.h>
13#if defined(BI_HAS_PRAGMA_ONCE)
14# pragma once
15#endif
16
17#include <owl/framewin.h>
18
19
20namespace owl {
21
22#include <owl/preclass.h>
23
24/// \addtogroup frame
25/// @{
26
27class _OWLCLASS TMDIClient;
28
29//
30/// \class TMDIChild
31// ~~~~~ ~~~~~~~~~
32/// TMDIChild defines the basic behavior of all MDI child windows. Child windows can
33/// be created inside the client area of a parent window. Because child windows
34/// exist within, and are restricted to the parent window's borders, the parent
35/// window defined before the child is defined. For example, a dialog box is a
36/// window that contains child windows, often referred to as dialog box controls.
37///
38/// To be used as MDI children, classes must be derived from TMDIChild. MDI children
39/// can inherit keyboard navigation, focus handling, and icon support from
40/// TFrameWindow. TMDIChild is a streamable class.
41//
42class _OWLCLASS TMDIChild : virtual public TFrameWindow {
43 public:
44 TMDIChild(TMDIClient& parent,
45 LPCTSTR title = 0,
46 TWindow* clientWnd = 0,
47 bool shrinkToClient = false,
48 TModule* module = 0);
49
50 TMDIChild(TMDIClient& parent,
51 const tstring& title,
52 TWindow* clientWnd = 0,
53 bool shrinkToClient = false,
54 TModule* module = 0);
55
56 TMDIChild(HWND hWnd, TModule* module = 0);
57
58 ~TMDIChild();
59
60 // Override virtual methods defined by TWindow
61 //
62 auto PreProcessMsg(MSG&) -> bool override;
63 auto ShowWindow(int cmdShow) -> bool override;
64 auto EnableWindow(bool enable) -> bool override;
65 void Destroy(int retVal = 0) override;
66
67 protected:
68 auto PerformCreate() -> THandle override;
69 virtual TResult DefWindowProc(TMsgId, TParam1, TParam2);
70
71 void EvMDIActivate(HWND hWndActivated, HWND hWndDeactivated);
72 bool EvNCActivate(bool active);
73 void EvMenuSelect(uint menuItemId, uint flags, HMENU hMenu);
74 void EvEnterIdle(uint source, HWND hWndDlg);
75
76 private:
77 // Hidden to prevent accidental copying or assignment
78 //
79 TMDIChild(const TMDIChild&);
81
84};
85
87
88#include <owl/posclass.h>
89
91
92/// @}
93
94} // OWL namespace
95
96
97#endif // OWL_MDICHILD_H
Derived from TWindow, TFrameWindow controls such window-specific behavior as keyboard navigation and ...
Definition framewin.h:96
TMDIChild defines the basic behavior of all MDI child windows.
Definition mdichild.h:42
Multiple Document Interface (MDI) client windows (represented by a TMDIClient object) manage the MDI ...
Definition mdi.h:37
ObjectWindows dynamic-link libraries (DLLs) construct an instance of TModule, which acts as an object...
Definition module.h:75
TWindow, derived from TEventHandler and TStreamableBase, provides window-specific behavior and encaps...
Definition window.h:414
HWND THandle
TWindow encapsulates an HWND.
Definition window.h:418
#define DECLARE_RESPONSE_TABLE(cls)
Definition eventhan.h:436
Definition of class TFrameWindow.
#define DECLARE_STREAMABLE_OWL(cls, ver)
Definition objstrm.h:1529
#define DECLARE_STREAMABLE_INLINES(cls)
Definition objstrm.h:1538
TMDIChild TMdiChild
Definition mdichild.h:90
Object Windows Library (OWLNext Core)
Definition animctrl.h:22
UINT TMsgId
Message ID type.
Definition dispatch.h:53
LPARAM TParam2
Second parameter type.
Definition dispatch.h:55
WPARAM TParam1
First parameter type.
Definition dispatch.h:54
std::string tstring
Definition defs.h:79
unsigned int uint
Definition number.h:25
#define _OWLCLASS
Definition defs.h:338