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