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