afd331344da7543e8a2cd0cdf77c475f6fa92903
[reactos.git] / dll / win32 / devmgr / 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 BOOL m_RefreshPending;
21
22 public:
23 CDeviceManager(void);
24 ~CDeviceManager(void);
25
26 bool Create(
27 _In_ HWND hWndParent,
28 _In_ HINSTANCE hInst,
29 _In_opt_z_ LPCWSTR lpMachineName,
30 _In_ int nCmdShow
31 );
32
33 private:
34 static LRESULT CALLBACK MainWndProc(
35 HWND hwnd,
36 UINT msg,
37 WPARAM wParam,
38 LPARAM lParam
39 );
40
41 bool Initialize(
42 _In_z_ LPCTSTR lpCaption,
43 _In_ int nCmdShow
44 );
45
46 int Run();
47 void Uninitialize(void);
48
49 LRESULT OnCreate(
50 _In_ HWND hwnd
51 );
52
53 LRESULT OnDestroy(void);
54 LRESULT OnSize(void);
55
56 LRESULT OnNotify(
57 _In_ LPARAM lParam
58 );
59
60 LRESULT OnContext(
61 _In_ LPARAM lParam
62 );
63
64 LRESULT OnCommand(
65 _In_ WPARAM wParam,
66 LPARAM lParam
67 );
68
69 void OnActivate(void);
70
71 bool CreateToolBar(void);
72 bool CreateStatusBar(void);
73
74 void UpdateToolbar(void);
75
76 bool StatusBarLoadString(
77 _In_ HWND hStatusBar,
78 _In_ INT PartId,
79 _In_ HINSTANCE hInstance,
80 _In_ UINT uID
81 );
82
83 void UpdateStatusBar(
84 _In_ bool InMenuLoop
85 );
86
87 bool MainWndMenuHint(
88 _In_ WORD CmdId,
89 _In_ const MENU_HINT *HintArray,
90 _In_ DWORD HintsCount,
91 _In_ UINT DefHintId
92 );
93
94 bool RefreshView(
95 _In_ ViewType Type,
96 _In_ bool ScanForChanges
97 );
98 };
99