[NTDLL]
[reactos.git] / base / applications / mscutils / devmgmt / precomp.h
1 #pragma once
2
3 #define WIN32_LEAN_AND_MEAN
4 #include <windows.h>
5 #include <windowsx.h>
6 #include <stdio.h>
7 #include <tchar.h>
8 #include <setupapi.h>
9 #include <cfgmgr32.h>
10 #include <commctrl.h>
11 #include <dll/devmgr/devmgr.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 INT_PTR 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
57 VOID FreeDeviceStrings(HWND hTreeView);
58 VOID OpenPropSheet(HWND hTreeView, HTREEITEM hItem);
59 HTREEITEM InitTreeView(HWND hTreeView);
60 VOID ListDevicesByType(HWND hTreeView, HTREEITEM hRoot);
61
62
63 /* misc.c */
64 INT AllocAndLoadString(OUT LPTSTR *lpTarget,
65 IN HINSTANCE hInst,
66 IN UINT uID);
67
68 DWORD LoadAndFormatString(IN HINSTANCE hInstance,
69 IN UINT uID,
70 OUT LPTSTR *lpTarget,
71 ...);
72
73 BOOL StatusBarLoadAndFormatString(IN HWND hStatusBar,
74 IN INT PartId,
75 IN HINSTANCE hInstance,
76 IN UINT uID,
77 ...);
78
79 BOOL StatusBarLoadString(IN HWND hStatusBar,
80 IN INT PartId,
81 IN HINSTANCE hInstance,
82 IN UINT uID);
83
84 INT GetTextFromEdit(OUT LPTSTR lpString,
85 IN HWND hDlg,
86 IN UINT Res);
87
88 HIMAGELIST InitImageList(UINT NumButtons,
89 UINT StartResource,
90 UINT Width,
91 UINT Height);
92
93 VOID GetError(VOID);
94 VOID DisplayString(LPTSTR);