1 #ifndef __StatusControl_h__
2 #define __StatusControl_h__
4 #include "../Common/WinCommon.h"
5 #include "../../DasherCore/DasherInterfaceBase.h"
10 extern CONST UINT DASHER_SHOW_PREFS
;
11 #define _DASHER_SHOW_PREFS (LPCWSTR)"dasher_show_prefs"
13 class CStatusControl
: public ATL::CWindowImpl
<CStatusControl
> {
15 CStatusControl(CDasherInterfaceBase
*pDasherInterface
);
17 // ATL boilerplate code
18 DECLARE_WND_SUPERCLASS(L
"STATUSCONTROL", L
"STATIC");
20 BEGIN_MSG_MAP(CStatusControl
)
21 MESSAGE_HANDLER(WM_COMMAND
, OnCommand
)
22 MESSAGE_HANDLER(WM_NOTIFY
, OnNotify
)
23 MESSAGE_HANDLER(WM_SIZE
, OnSize
)
27 LRESULT
OnCommand(UINT message
, WPARAM wParam
, LPARAM lParam
, BOOL
& bHandled
);
28 LRESULT
OnNotify(UINT message
, WPARAM wParam
, LPARAM lParam
, BOOL
& bHandled
);
29 LRESULT
OnSize(UINT message
, WPARAM wParam
, LPARAM lParam
, BOOL
& bHandled
);
31 // Create the window, with children
32 HWND
Create(HWND hParent
);
35 // Create the child windows of the control
36 void CreateChildren();
38 // Initial layout of child windows
39 void LayoutChildrenInitial();
41 // Incremental update of child windows
42 void LayoutChildrenUpdate();
44 // Update the contents of the alphabet seletion combo
47 // Update Dasher to reflect the new alphabet selection
48 void SelectAlphabet();
50 // Update the contents of the speed control
53 // Update Dasher and the edit box to represent the current speed
54 void UpdateSpeed(int iPos
, int iDelta
);
56 // The Dasher interface with which this control communicates
57 CDasherInterfaceBase
*m_pDasherInterface
;
59 // Handles to child windows
64 HWND m_hAlphabetLabel
;