[DEVMGR]
[reactos.git] / reactos / 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 CMainWindow
11 {
12 CAtlStringW m_szMainWndClass;
13 CDeviceView *m_DeviceView;
14 HWND m_hMainWnd;
15 HWND m_hStatusBar;
16 HWND m_hToolBar;
17 HIMAGELIST m_ToolbarhImageList;
18 HMENU m_hMenu;
19 int m_CmdShow;
20
21 public:
22 CMainWindow(void);
23 ~CMainWindow(void);
24
25 bool Initialize(LPCTSTR lpCaption, int nCmdShow);
26 int Run();
27 void Uninitialize();
28
29 private:
30 static LRESULT CALLBACK MainWndProc(
31 HWND hwnd,
32 UINT msg,
33 WPARAM wParam,
34 LPARAM lParam
35 );
36
37 LRESULT OnCreate(HWND hwnd);
38 LRESULT OnDestroy();
39 LRESULT OnSize();
40 LRESULT OnNotify(LPARAM lParam);
41 LRESULT OnContext(LPARAM lParam);
42 LRESULT OnCommand(WPARAM wParam, LPARAM lParam);
43
44 bool CreateToolBar();
45 bool CreateStatusBar();
46
47 void UpdateContext(_In_ LPTV_ITEMW TvItem);
48
49 bool StatusBarLoadString(
50 HWND hStatusBar,
51 INT PartId,
52 HINSTANCE hInstance,
53 UINT uID
54 );
55
56 bool MainWndMenuHint(
57 WORD CmdId,
58 const MENU_HINT *HintArray,
59 DWORD HintsCount,
60 UINT DefHintId
61 );
62
63 bool RefreshView(
64 ViewType Type
65 );
66
67 bool ScanForHardwareChanges(
68 );
69 };
70