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/Menu.h"
16 #include "Widgets/SplashScreen.h"
17 #include "Widgets/WindowSelect.h"
18 #include "DasherMouseInput.h"
19 #include "AppSettings.h"
20 #include "GameModeHelper.h"
22 #include "../Common/WinOptions.h"
30 // Abstract interfaces to the Dasher engine
31 #include "../../DasherCore/DasherInterfaceBase.h"
34 public ATL::CWindowImpl
<CDasherWindow
>,
41 DECLARE_WND_CLASS(_T("DASHER") )
43 BEGIN_MSG_MAP( CDasherWindow
)
44 MESSAGE_HANDLER(WM_DESTROY
, OnDestroy
)
45 MESSAGE_HANDLER(WM_COMMAND
, OnCommand
)
46 MESSAGE_HANDLER(WM_CLOSE
, OnClose
)
47 MESSAGE_HANDLER(WM_SIZE
, OnSize
)
48 MESSAGE_HANDLER(WM_GETMINMAXINFO
,OnGetMinMaxInfo
)
49 MESSAGE_HANDLER(WM_INITMENUPOPUP
,OnInitMenuPopup
)
50 MESSAGE_HANDLER(WM_SETFOCUS
,OnSetFocus
)
51 MESSAGE_RANGE_HANDLER(0xC000,0xFFFF,OnOther
)
54 LRESULT
OnSetFocus(UINT message
, WPARAM wParam
, LPARAM lParam
, BOOL
& bHandled
);
55 LRESULT
OnInitMenuPopup(UINT message
, WPARAM wParam
, LPARAM lParam
, BOOL
& bHandled
);
56 LRESULT
OnGetMinMaxInfo(UINT message
, WPARAM wParam
, LPARAM lParam
, BOOL
& bHandled
);
57 LRESULT
OnOther(UINT message
, WPARAM wParam
, LPARAM lParam
, BOOL
& bHandled
);
58 LRESULT
OnDasherEvent(UINT message
, WPARAM wParam
, LPARAM lParam
, BOOL
& bHandled
);
59 LRESULT
OnDasherFocus(UINT message
, WPARAM wParam
, LPARAM lParam
, BOOL
& bHandled
);
60 LRESULT
OnSize(UINT message
, WPARAM wParam
, LPARAM lParam
, BOOL
& bHandled
);
61 LRESULT
OnDestroy(UINT message
, WPARAM wParam
, LPARAM lParam
, BOOL
& bHandled
);
62 LRESULT
OnClose(UINT message
, WPARAM wParam
, LPARAM lParam
, BOOL
& bHandled
);
63 LRESULT
OnCommand(UINT message
, WPARAM wParam
, LPARAM lParam
, BOOL
& bHandled
);
66 // Create window (and children)
67 // failure returns NULL
70 void Show(int nCmdShow
);
76 // Main processing function, called by MessageLoop
79 void SaveWindowState() const;
80 bool LoadWindowState();
82 Dasher::CDasher
*m_pDasher
;
86 // Method to set values of all settings in the menu
87 void PopulateSettings();
90 /// Handle control events
93 void HandleControlEvent(int iID
);
95 void HandleParameterChange(int iParameter
);
101 CSplitter
*m_pSplitter
;
102 CSlidebar
*m_pSlidebar
;
106 CAppSettings
*m_pAppSettings
;
111 LPCWSTR DialogCaption
;
112 char tmpAutoOffset
[25];
114 // Misc window handling
117 CGameModeHelper
*m_pGameModeHelper
;
121 #endif /* #ifdef __MainWindow_h__ */