[DEVMGMT]
[reactos.git] / reactos / base / applications / mscutils / devmgmt / precomp.h
1 #ifndef __DEVMGMT_PRECOMP_H
2 #define __DEVMGMT_PRECOMP_H
3
4 #include <stdarg.h>
5
6 #include <windef.h>
7 #include <winbase.h>
8 #include <winuser.h>
9 #include <winreg.h>
10 #include <wingdi.h>
11 #include <tchar.h>
12 #include <setupapi.h>
13
14 #include "resource.h"
15
16 #ifdef _MSC_VER
17 #pragma warning(disable : 4100)
18 #endif
19
20 #define MAX_DEV_LEN 256
21
22 typedef enum
23 {
24 DevicesByType,
25 DevicesByConnection,
26 RessourcesByType,
27 RessourcesByConnection
28 } DISPLAY_TYPE;
29
30 typedef struct _MAIN_WND_INFO
31 {
32 HWND hMainWnd;
33 HWND hTreeView;
34 HWND hStatus;
35 HWND hTool;
36 HWND hProgDlg;
37 HMENU hShortcutMenu;
38 int nCmdShow;
39
40 DISPLAY_TYPE Display;
41 BOOL bShowHidden;
42
43 /* status flags */
44 UINT InMenuLoop : 1;
45
46 } MAIN_WND_INFO, *PMAIN_WND_INFO;
47
48
49 typedef struct _DEVCLASS_ENTRY
50 {
51 GUID ClassGuid;
52 INT ClassImage;
53 BOOL bUsed;
54 HTREEITEM hItem;
55 } DEVCLASS_ENTRY, *PDEVCLASS_ENTRY;
56
57
58 INT_PTR CALLBACK AboutDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
59
60
61 /* devmgmt.c */
62 extern HINSTANCE hInstance;
63 extern HANDLE ProcessHeap;
64
65 /* mainwnd.c */
66 typedef struct _MENU_HINT
67 {
68 WORD CmdId;
69 UINT HintId;
70 } MENU_HINT, *PMENU_HINT;
71
72 BOOL InitMainWindowImpl(VOID);
73 VOID UninitMainWindowImpl(VOID);
74 HWND CreateMainWindow(LPCTSTR lpCaption, int nCmdShow);
75
76
77 /* enumdevices.c */
78
79 VOID FreeDeviceStrings(HWND hTreeView);
80 VOID OpenPropSheet(HWND hTreeView, HTREEITEM hItem);
81 HTREEITEM InitTreeView(HWND hTreeView);
82 VOID ListDevicesByType(HWND hTreeView, HTREEITEM hRoot, BOOL bShowHidden);
83 VOID ListDevicesByConnection(HWND hTreeView, HTREEITEM hRoot, BOOL bShowHidden);
84
85
86 /* misc.c */
87 INT AllocAndLoadString(OUT LPTSTR *lpTarget,
88 IN HINSTANCE hInst,
89 IN UINT uID);
90
91 DWORD LoadAndFormatString(IN HINSTANCE hInstance,
92 IN UINT uID,
93 OUT LPTSTR *lpTarget,
94 ...);
95
96 BOOL StatusBarLoadAndFormatString(IN HWND hStatusBar,
97 IN INT PartId,
98 IN HINSTANCE hInstance,
99 IN UINT uID,
100 ...);
101
102 BOOL StatusBarLoadString(IN HWND hStatusBar,
103 IN INT PartId,
104 IN HINSTANCE hInstance,
105 IN UINT uID);
106
107 INT GetTextFromEdit(OUT LPTSTR lpString,
108 IN HWND hDlg,
109 IN UINT Res);
110
111 HIMAGELIST InitImageList(UINT NumButtons,
112 UINT StartResource,
113 UINT Width,
114 UINT Height);
115
116 VOID GetError(VOID);
117 VOID DisplayString(LPTSTR);
118
119 #endif /* __DEVMGMT_PRECOMP_H */