57#if defined(OWL5_COMPAT)
114 ClientWnd->SetParent(
this);
134 operator HMENU() {
return m; }
137 menu(Attr.Menu ? LoadMenu(Attr.Menu) :
CreateMenu());
138 WARNX(
OwlWin, !menu, 0,
_T(
"Unable to load menu: ") << Attr.Menu <<
_T(
" from ") << *GetModule());
141 GetWindowClassName().GetPointerRepresentation(),
144 Attr.X, Attr.Y, Attr.W, Attr.H,
145 Parent ? Parent->GetHandle() :
nullptr,
150 if (
h) menu.RelinquishOwnership();
169 int numItems = ::GetMenuItemCount(menu);
231 TRACEX(
OwlCmd, 1,
"TMDIFrame::GetCommandTarget - returns " << \
232 (
mdiChild ?
"ActiveMDIChild->GetCommandTarget()" \
233 :
"TFrameWindow::GetCommandTarget()"));
251#if OWL_PERSISTENT_STREAMS
260 GetObject()->AssignMenu(GetObject()->Attr.Menu);
268TMDIFrame::Streamer::Write(opstream&
os)
const
Definition of class TApplication.
#define WARNX(group, condition, level, message)
#define PRECONDITION(condition)
#define DIAG_DECLARE_GROUP(group)
#define TRACEX(group, level, message)
virtual void PreProcessMenu(HMENU hMenubar)
Called by the main window to provide an oportunity to preprocess the main window's menubar before it ...
Derived from TWindow, TFrameWindow controls such window-specific behavior as keyboard navigation and ...
void Init(TWindow *clientWnd, bool shrinkToClient)
Normal initialization of a default constructed TFrameWindow.
virtual HWND GetCommandTarget()
Locates and returns the child window that is the target of the command and command enable messages.
virtual bool AssignMenu(TResId menuResId)
Perform a high-level menu assignment either before or after the HWND for the window has been created.
Multiple Document Interface (MDI) client windows (represented by a TMDIClient object) manage the MDI ...
Multiple Document Interface (MDI) frame windows, represented by TMDIFrame, are overlapped windows tha...
auto SetMenu(HMENU) -> bool override
Searches for the MDI child menu in the new menu bar and updates the child menu position with the spec...
auto GetClientWindow() -> TMDIClient *override
Returns a pointer to the MDI client window.
auto PerformCreate() -> THandle override
Overrides TWindow's virtual PerformCreate function.
virtual TResult DefWindowProc(TMsgId, TParam1, TParam2)
Overrides TWindow::DefWindowProc and provides default processing for any incoming message the MDI fra...
static HMENU FindChildMenu(HMENU)
Find & return the child menu of an MDI frame's (or anyone's) menu bar.
auto GetCommandTarget() -> HWND override
Locates and returns the child window that is the target of the command and the command enabling messa...
TMDIFrame(LPCTSTR title, TResId menuResId, std::unique_ptr< TMDIClient > clientWnd=nullptr, TModule *=nullptr)
Constructs an MDI frame window object using the caption (title) and resource ID (menuResId).
ObjectWindows dynamic-link libraries (DLLs) construct an instance of TModule, which acts as an object...
static UINT GetMenuState(HMENU, UINT, UINT)
TWindow, derived from TEventHandler and TStreamableBase, provides window-specific behavior and encaps...
TApplication * GetApplication() const
Gets a pointer to the TApplication object associated with this.
void DrawMenuBar()
DrawMenuBar redraws the menu bar.
TWindow * GetParent() const
Retrieves the OWL object of the parent window. If none exists, returns 0.
void Init(TWindow *parent, LPCTSTR title, TModule *module)
Normal initialization of a default constructed TWindow.
bool IsFlagSet(uint mask)
Returns the state of the bit flag in Attr.Flags whose mask is supplied.
HWND GetHandle() const
Returns the handle of the window.
ipstream, a specialized input stream derivative of pstream, is the base class for reading (extracting...
#define DEFINE_RESPONSE_TABLE1(cls, base)
Macro to define a response table for a class with one base.
#define IMPLEMENT_STREAMABLE2(cls, base1, base2)
@ wfMainWindow
This frame window is the main window.
Definition of TMDIClient and TMDIFrame classes.
Object Windows Library (OWLNext Core)
UINT TMsgId
Message ID type.
LPARAM TParam2
Second parameter type.
WPARAM TParam1
First parameter type.
LRESULT TResult
Result type.
#define TYPESAFE_DOWNCAST(object, toClass)