Stroika Library 3.0d18
 
Loading...
Searching...
No Matches
LedLineItInPlaceFrame.cpp
1/*
2 * Copyright(c) Sophist Solutions, Inc. 1990-2025. All rights reserved
3 */
4
5#include "Stroika/Foundation/StroikaPreComp.h"
6
7#include "Resource.h"
8
9#include "LedLineItInPlaceFrame.h"
10
11using namespace Stroika::Foundation;
12using namespace Stroika::Frameworks::Led;
13
14/*
15 ********************************************************************************
16 *************************** LedLineItInPlaceFrame ******************************
17 ********************************************************************************
18 */
19IMPLEMENT_DYNCREATE (LedLineItInPlaceFrame, COleIPFrameWnd)
20
21BEGIN_MESSAGE_MAP (LedLineItInPlaceFrame, COleIPFrameWnd)
22ON_WM_CREATE ()
23ON_COMMAND (ID_HELP_FINDER, OnHelpFinder)
24ON_COMMAND (ID_HELP, OnHelp)
25ON_COMMAND (ID_DEFAULT_HELP, OnHelpFinder)
26ON_COMMAND (ID_CONTEXT_HELP, OnContextHelp)
27END_MESSAGE_MAP ()
28
29LedLineItInPlaceFrame::LedLineItInPlaceFrame ()
30 : COleIPFrameWnd ()
31{
32}
33
34LedLineItInPlaceFrame::~LedLineItInPlaceFrame ()
35{
36}
37
38int LedLineItInPlaceFrame::OnCreate (LPCREATESTRUCT lpCreateStruct)
39{
40 if (COleIPFrameWnd::OnCreate (lpCreateStruct) == -1)
41 return -1;
42
43 // CResizeBar implements in-place resizing.
44 if (!m_wndResizeBar.Create (this)) {
45 TRACE0 ("Failed to create resize bar\n");
46 return -1; // fail to create
47 }
48
49 // By default, it is a good idea to register a drop-target that does
50 // nothing with your frame window. This prevents drops from
51 // "falling through" to a container that supports drag-drop.
52 m_dropTarget.Register (this);
53
54 return 0;
55}
56
57// OnCreateControlBars is called by the framework to create control bars on the
58// container application's windows. pWndFrame is the top level frame window of
59// the container and is always non-NULL. pWndDoc is the doc level frame window
60// and will be NULL when the container is an SDI application. A server
61// application can place MFC control bars on either window.
62BOOL LedLineItInPlaceFrame::OnCreateControlBars (CFrameWnd* pWndFrame, CFrameWnd* /*pWndDoc*/)
63{
64 // Set owner to this window, so messages are delivered to correct app
65 m_wndToolBar.SetOwner (this);
66
67 // Create toolbar on client's frame window
68 if (!m_wndToolBar.Create (pWndFrame) || !m_wndToolBar.LoadToolBar (IDR_SRVR_INPLACE)) {
69 TRACE0 ("Failed to create toolbar\n");
70 return FALSE;
71 }
72
73 // TODO: Remove this if you don't want tool tips or a resizeable toolbar
74 m_wndToolBar.SetBarStyle (m_wndToolBar.GetBarStyle () | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC);
75
76 // TODO: Delete these three lines if you don't want the toolbar to
77 // be dockable
78 m_wndToolBar.EnableDocking (CBRS_ALIGN_ANY);
79 pWndFrame->EnableDocking (CBRS_ALIGN_ANY);
80 pWndFrame->DockControlBar (&m_wndToolBar);
81
82 return TRUE;
83}
84
85BOOL LedLineItInPlaceFrame::PreCreateWindow (CREATESTRUCT& cs)
86{
87 // TODO: Modify the Window class or styles here by modifying
88 // the CREATESTRUCT cs
89
90 return COleIPFrameWnd::PreCreateWindow (cs);
91}
92
93#ifdef _DEBUG
94void LedLineItInPlaceFrame::AssertValid () const
95{
96 COleIPFrameWnd::AssertValid ();
97}
98
99void LedLineItInPlaceFrame::Dump (CDumpContext& dc) const
100{
101 COleIPFrameWnd::Dump (dc);
102}
103#endif //_DEBUG