Create a branch for console restructuration work.
[reactos.git] / 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 INT_PTR CALLBACK AboutDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
50
51
52 /* devmgmt.c */
53 extern HINSTANCE hInstance;
54 extern HANDLE ProcessHeap;
55
56 /* mainwnd.c */
57 typedef struct _MENU_HINT
58 {
59 WORD CmdId;
60 UINT HintId;
61 } MENU_HINT, *PMENU_HINT;
62
63 BOOL InitMainWindowImpl(VOID);
64 VOID UninitMainWindowImpl(VOID);
65 HWND CreateMainWindow(LPCTSTR lpCaption, int nCmdShow);
66
67
68 /* enumdevices.c */
69
70 VOID FreeDeviceStrings(HWND hTreeView);
71 VOID OpenPropSheet(HWND hTreeView, HTREEITEM hItem);
72 HTREEITEM InitTreeView(HWND hTreeView);
73 VOID ListDevicesByType(HWND hTreeView, HTREEITEM hRoot, BOOL bShowHidden);
74 VOID ListDevicesByConnection(HWND hTreeView, HTREEITEM hRoot, BOOL bShowHidden);
75
76
77 /* misc.c */
78 INT AllocAndLoadString(OUT LPTSTR *lpTarget,
79 IN HINSTANCE hInst,
80 IN UINT uID);
81
82 DWORD LoadAndFormatString(IN HINSTANCE hInstance,
83 IN UINT uID,
84 OUT LPTSTR *lpTarget,
85 ...);
86
87 BOOL StatusBarLoadAndFormatString(IN HWND hStatusBar,
88 IN INT PartId,
89 IN HINSTANCE hInstance,
90 IN UINT uID,
91 ...);
92
93 BOOL StatusBarLoadString(IN HWND hStatusBar,
94 IN INT PartId,
95 IN HINSTANCE hInstance,
96 IN UINT uID);
97
98 INT GetTextFromEdit(OUT LPTSTR lpString,
99 IN HWND hDlg,
100 IN UINT Res);
101
102 HIMAGELIST InitImageList(UINT NumButtons,
103 UINT StartResource,
104 UINT Width,
105 UINT Height);
106
107 VOID GetError(VOID);
108 VOID DisplayString(LPTSTR);
109
110 #endif /* __DEVMGMT_PRECOMP_H */