Stroika Library 3.0d18
 
Loading...
Searching...
No Matches
LedLineItDocFrame.cpp
1/*
2 * Copyright(c) Sophist Solutions, Inc. 1990-2025. All rights reserved
3 */
4
5#include "Stroika/Foundation/StroikaPreComp.h"
6
7#include <cstdio>
8
9#include "LedLineItView.h"
10#include "Resource.h"
11
12#include "LedLineItDocFrame.h"
13
14using namespace Stroika::Foundation;
15using namespace Stroika::Frameworks::Led;
16
17/*
18 ********************************************************************************
19 ******************************** LedLineItDocFrame *****************************
20 ********************************************************************************
21 */
22IMPLEMENT_DYNCREATE (LedLineItDocFrame, CMDIChildWnd)
23BEGIN_MESSAGE_MAP (LedLineItDocFrame, LedLineItDocFrame::inherited)
24ON_WM_CREATE ()
25END_MESSAGE_MAP ()
26
27int LedLineItDocFrame::OnCreate (LPCREATESTRUCT lpCreateStruct)
28{
29 RequireNotNull (lpCreateStruct);
30
31 if (inherited::OnCreate (lpCreateStruct) == -1) {
32 return -1;
33 }
34
35 /*
36 * When we are creating the first MDI child window, start out with it maximized. No point in
37 * wasting all that space! I dunno why MDI doesn't do this by default?
38 */
39 CMDIFrameWnd* owningFrame = GetMDIFrame ();
40 RequireNotNull (owningFrame);
41 if (owningFrame->MDIGetActive () == NULL) {
42 ::SetWindowLong (m_hWnd, GWL_STYLE, GetStyle () | WS_MAXIMIZE);
43 }
44
45 return 0;
46}
#define RequireNotNull(p)
Definition Assertions.h:347