set most of trunk svn property eol-style:native
[reactos.git] / reactos / base / applications / 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 "resource.h"
13
14 #ifdef _MSC_VER
15 #pragma warning(disable : 4100)
16 #endif
17
18 #define MAX_DEV_LEN 256
19
20 typedef struct _MAIN_WND_INFO
21 {
22 HWND hMainWnd;
23 HWND hTreeView;
24 HWND hStatus;
25 HWND hTool;
26 HWND hProgDlg;
27 HMENU hShortcutMenu;
28 int nCmdShow;
29
30 /* status flags */
31 UINT InMenuLoop : 1;
32
33 } MAIN_WND_INFO, *PMAIN_WND_INFO;
34
35
36 BOOL CALLBACK AboutDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
37
38
39 /* devmgmt.c */
40 extern HINSTANCE hInstance;
41 extern HANDLE ProcessHeap;
42
43 /* mainwnd.c */
44 typedef struct _MENU_HINT
45 {
46 WORD CmdId;
47 UINT HintId;
48 } MENU_HINT, *PMENU_HINT;
49
50 BOOL InitMainWindowImpl(VOID);
51 VOID UninitMainWindowImpl(VOID);
52 HWND CreateMainWindow(LPCTSTR lpCaption, int nCmdShow);
53
54
55 /* enumdevices.c */
56 // undocumented API's from devmgr
57 #ifdef _UNICODE
58 #define DevicePropertiesEx DevicePropertiesExW
59 INT_PTR
60 WINAPI
61 DevicePropertiesExW(IN HWND hWndParent OPTIONAL,
62 IN LPCWSTR lpMachineName OPTIONAL,
63 IN LPCWSTR lpDeviceID OPTIONAL,
64 IN DWORD dwFlags OPTIONAL,
65 IN BOOL bShowDevMgr);
66 #else
67 #define DevicePropertiesEx DevicePropertiesExA
68 INT_PTR
69 WINAPI
70 DevicePropertiesExA(IN HWND hWndParent OPTIONAL,
71 IN LPCSTR lpMachineName OPTIONAL,
72 IN LPCSTR lpDeviceID OPTIONAL,
73 IN DWORD dwFlags OPTIONAL,
74 IN BOOL bShowDevMgr);
75 #endif
76
77 VOID FreeDeviceStrings(HWND hTreeView);
78 VOID OpenPropSheet(HWND hTreeView, HTREEITEM hItem);
79 HTREEITEM InitTreeView(HWND hTreeView);
80 VOID ListDevicesByType(HWND hTreeView, HTREEITEM hRoot);
81
82
83 /* misc.c */
84 INT AllocAndLoadString(OUT LPTSTR *lpTarget,
85 IN HINSTANCE hInst,
86 IN UINT uID);
87
88 DWORD LoadAndFormatString(IN HINSTANCE hInstance,
89 IN UINT uID,
90 OUT LPTSTR *lpTarget,
91 ...);
92
93 BOOL StatusBarLoadAndFormatString(IN HWND hStatusBar,
94 IN INT PartId,
95 IN HINSTANCE hInstance,
96 IN UINT uID,
97 ...);
98
99 BOOL StatusBarLoadString(IN HWND hStatusBar,
100 IN INT PartId,
101 IN HINSTANCE hInstance,
102 IN UINT uID);
103
104 INT GetTextFromEdit(OUT LPTSTR lpString,
105 IN HWND hDlg,
106 IN UINT Res);
107
108 HIMAGELIST InitImageList(UINT NumButtons,
109 UINT StartResource,
110 UINT Width,
111 UINT Height);
112
113 VOID GetError(VOID);
114 VOID DisplayString(LPTSTR);
115
116 #endif /* __DEVMGMT_PRECOMP_H */