[DEV[DEVMGR]
[reactos.git] / reactos / dll / win32 / devmgr_new / devmgmt / MainWindow.h
1 #pragma once
2 #include "DeviceView.h"
3
4 typedef struct _MENU_HINT
5 {
6 WORD CmdId;
7 UINT HintId;
8 } MENU_HINT, *PMENU_HINT;
9
10 class CDeviceManager
11 {
12 CAtlStringW m_szMainWndClass;
13 CDeviceView *m_DeviceView;
14 HWND m_hMainWnd;
15 HWND m_hStatusBar;
16 HWND m_hToolBar;
17 HMENU m_hMenu;
18 HMENU m_hActionMenu;
19 int m_CmdShow;
20
21 public:
22 CDeviceManager(void);
23 ~CDeviceManager(void);
24
25 bool Create(
26 _In_ HWND hWndParent,
27 _In_ HINSTANCE hInst,
28 _In_opt_z_ LPCWSTR lpMachineName,
29 _In_ int nCmdShow
30 );
31
32 private:
33 static LRESULT CALLBACK MainWndProc(
34 HWND hwnd,
35 UINT msg,
36 WPARAM wParam,
37 LPARAM lParam
38 );
39
40 bool Initialize(
41 _In_z_ LPCTSTR lpCaption,
42 _In_ int nCmdShow
43 );
44
45 int Run();
46 void Uninitialize(void);
47
48 LRESULT OnCreate(
49 _In_ HWND hwnd
50 );
51
52 LRESULT OnDestroy(void);
53 LRESULT OnSize(void);
54
55 LRESULT OnNotify(
56 _In_ LPARAM lParam
57 );
58
59 LRESULT OnContext(
60 _In_ LPARAM lParam
61 );
62
63 LRESULT OnCommand(
64 _In_ WPARAM wParam,
65 LPARAM lParam
66 );
67
68 bool CreateToolBar(void);
69 bool CreateStatusBar(void);
70
71 void UpdateToolbar(void);
72
73 bool StatusBarLoadString(
74 _In_ HWND hStatusBar,
75 _In_ INT PartId,
76 _In_ HINSTANCE hInstance,
77 _In_ UINT uID
78 );
79
80 void UpdateStatusBar(
81 _In_ bool InMenuLoop
82 );
83
84 bool MainWndMenuHint(
85 _In_ WORD CmdId,
86 _In_ const MENU_HINT *HintArray,
87 _In_ DWORD HintsCount,
88 _In_ UINT DefHintId
89 );
90
91 bool RefreshView(
92 _In_ ViewType Type
93 );
94 };
95