3 /////////////////////////////////////////////////////////////////////////////
5 // Copyright (c) 2002 Iain Murray, Inference Group, Cavendish, Cambridge.
7 /////////////////////////////////////////////////////////////////////////////
9 #ifndef __DasherWindow_h__
10 #define __DasherWindow_h__
14 #include "Widgets/Splitter.h"
15 #include "Widgets/StatusControl.h"
16 #include "Widgets/Menu.h"
17 #include "Widgets/SplashScreen.h"
18 #include "Widgets/WindowSelect.h"
19 #include "DasherMouseInput.h"
20 #include "AppSettings.h"
22 #include "../Common/WinOptions.h"
29 // Abstract interfaces to the Dasher engine
30 #include "../../DasherCore/DasherInterfaceBase.h"
34 public ATL::CWindowImpl
<CDasherWindow
, CWindow
, CWinTraits
< WS_CLIPCHILDREN
| WS_CLIPSIBLINGS
> >,
39 public ATL::CWindowImpl
<CDasherWindow
>,
44 //, CWindow, CFrameWinTraits>,
49 DECLARE_WND_CLASS(_T("DASHER"))
51 BEGIN_MSG_MAP( CDasherWindow
)
52 MESSAGE_HANDLER(WM_DESTROY
, OnDestroy
)
53 MESSAGE_HANDLER(WM_COMMAND
, OnCommand
)
54 MESSAGE_HANDLER(WM_CLOSE
, OnClose
)
55 MESSAGE_HANDLER(WM_SIZE
, OnSize
)
57 MESSAGE_HANDLER(WM_GETMINMAXINFO
,OnGetMinMaxInfo
)
59 MESSAGE_HANDLER(WM_INITMENUPOPUP
,OnInitMenuPopup
)
60 MESSAGE_HANDLER(WM_SETFOCUS
,OnSetFocus
)
61 MESSAGE_RANGE_HANDLER(0xC000,0xFFFF,OnOther
)
64 LRESULT
OnSetFocus(UINT message
, WPARAM wParam
, LPARAM lParam
, BOOL
& bHandled
);
65 LRESULT
OnInitMenuPopup(UINT message
, WPARAM wParam
, LPARAM lParam
, BOOL
& bHandled
);
67 LRESULT
OnGetMinMaxInfo(UINT message
, WPARAM wParam
, LPARAM lParam
, BOOL
& bHandled
);
69 LRESULT
OnOther(UINT message
, WPARAM wParam
, LPARAM lParam
, BOOL
& bHandled
);
70 LRESULT
OnDasherFocus(UINT message
, WPARAM wParam
, LPARAM lParam
, BOOL
& bHandled
);
71 LRESULT
OnSize(UINT message
, WPARAM wParam
, LPARAM lParam
, BOOL
& bHandled
);
72 LRESULT
OnDestroy(UINT message
, WPARAM wParam
, LPARAM lParam
, BOOL
& bHandled
);
73 LRESULT
OnClose(UINT message
, WPARAM wParam
, LPARAM lParam
, BOOL
& bHandled
);
74 LRESULT
OnCommand(UINT message
, WPARAM wParam
, LPARAM lParam
, BOOL
& bHandled
);
77 // Create window (and children)
78 // failure returns NULL
81 void Show(int nCmdShow
);
86 void HandleWinEvent(HWINEVENTHOOK hWinEventHook
, DWORD event
, HWND hwnd
,
87 LONG idObject
, LONG idChild
, DWORD dwEventThread
, DWORD dwmsEventTime
);
90 ///ACL making these public so can be called directly from CDasher,
91 /// rather than sending a windows message.
92 void HandleParameterChange(int iParameter
);
96 // Main processing function, called by MessageLoop
99 void SaveWindowState() const;
100 bool LoadWindowState();
102 Dasher::CDasher
*m_pDasher
;
107 CToolbar
*m_pToolbar
;
109 //CCanvas *m_pCanvas;
110 CSplitter
*m_pSplitter
;
111 CStatusControl
*m_pSpeedAlphabetBar
;
115 CAppSettings
*m_pAppSettings
;
122 LPCWSTR DialogCaption
;
123 char tmpAutoOffset
[25];
125 // Misc window handling
129 #endif /* #ifdef __MainWindow_h__ */