16#define BTN_PROPERTIES 0
17#define BTN_SCAN_HARDWARE 1
18#define BTN_ENABLE_DRV 2
19#define BTN_DISABLE_DRV 3
20#define BTN_UPDATE_DRV 4
21#define BTN_UNINSTALL_DRV 5
23#define REFRESH_TIMER 1
85 m_RefreshPending(
false)
121 Ret = MainWindow.
Run();
138 CAtlStringW szCaption;
212 UINT HintId = DefHintId;
214 LastHint = HintArray + HintsCount;
215 while (HintArray != LastHint)
217 if (HintArray->CmdId == CmdId)
219 HintId = HintArray->
HintId;
245 _In_ bool ScanForChanges)
339 int StatWidths[] = {110, -1};
357 sizeof(StatWidths) /
sizeof(
int),
358 (
LPARAM)StatWidths) != 0);
371 if (
Node->HasProperties())
415 CAtlStringW szMessage;
419 if (szMessage.LoadStringW(
hInstance, uID))
425 (
LPARAM)szMessage.GetBuffer()) != 0);
464 RECT rcClient, rcTool, rcStatus;
465 INT lvHeight, iToolHeight, iStatusHeight;
472 iToolHeight = rcTool.
bottom - rcTool.
top;
479 iStatusHeight = rcStatus.
bottom - rcStatus.
top;
485 lvHeight = rcClient.
bottom - iToolHeight - iStatusHeight;
539 UINT_PTR idButton = lpttt->hdr.idFrom;
655 CAtlStringW szAppAuthors;
730 goto HandleDefaultMessage;
751 RetCode =
This->OnSize();
793 goto HandleDefaultMessage;
821 This->RefreshView(
This->m_DeviceView->GetCurrentView(),
true);
834 This->UpdateStatusBar(
true);
840 This->UpdateStatusBar(
false);
861 RetCode =
This->OnDestroy();
#define InterlockedExchange
static const MENU_HINT SystemMenuHintTable[]
static const MENU_HINT MainMenuHintTable[]
#define IDS_HINT_SYS_CLOSE
#define IDS_HINT_SYS_MINIMIZE
#define IDS_HINT_SYS_SIZE
#define IDS_HINT_SYS_RESTORE
#define IDS_HINT_SYS_MOVE
#define IDS_HINT_SYS_MAXIMIZE
#define IDS_TOOLTIP_UNINSTALL
bool CreateStatusBar(void)
LRESULT OnCreate(_In_ HWND hwnd)
LRESULT OnContext(_In_ LPARAM lParam)
LRESULT OnCommand(_In_ WPARAM wParam, LPARAM lParam)
static LRESULT CALLBACK MainWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
bool RefreshView(_In_ ViewType Type, _In_ bool ScanForChanges)
bool Create(_In_ HWND hWndParent, _In_ HINSTANCE hInst, _In_opt_z_ LPCWSTR lpMachineName, _In_ int nCmdShow)
CDeviceView * m_DeviceView
bool StatusBarLoadString(_In_ HWND hStatusBar, _In_ INT PartId, _In_ HINSTANCE hInstance, _In_ UINT uID)
CAtlStringW m_szMainWndClass
LRESULT OnNotify(_In_ LPARAM lParam)
void UpdateStatusBar(_In_ bool InMenuLoop)
bool Initialize(_In_z_ LPCTSTR lpCaption, _In_ int nCmdShow)
bool MainWndMenuHint(_In_ WORD CmdId, _In_ const MENU_HINT *HintArray, _In_ DWORD HintsCount, _In_ UINT DefHintId)
virtual bool IsDisabled()
VOID SetHiddenDevices(_In_ bool ShowHidden)
CNode * GetSelectedNode()
LRESULT OnSize(_In_ int x, _In_ int y, _In_ int cx, _In_ int cy)
VOID DisplayPropertySheet()
ViewType GetCurrentView()
VOID Refresh(_In_ ViewType Type, _In_ bool ScanForChanges, _In_ bool UpdateView)
LRESULT OnAction(UINT Action)
LRESULT OnRightClick(_In_ LPNMHDR NmHdr)
bool CreateActionMenu(_In_ HMENU OwnerMenu, _In_ bool MainMenu)
LRESULT OnContextMenu(_In_ LPARAM lParam)
LRESULT OnDoubleClick(_In_ LPNMHDR NmHdr)
BOOL WINAPI InitCommonControlsEx(const INITCOMMONCONTROLSEX *lpInitCtrls)
#define DBT_DEVNODES_CHANGED
HINSTANCE g_hParentInstance
HINSTANCE g_hThisInstance
HINSTANCE g_hParentInstance
static const MENU_HINT SystemMenuHintTable[]
HINSTANCE g_hThisInstance
static const MENU_HINT MainMenuHintTable[]
#define BTN_SCAN_HARDWARE
static TBBUTTON TbButtons[]
#define BTN_UNINSTALL_DRV
#define IDS_HINT_DEV_BY_CONN
#define IDS_HINT_SHOW_HIDDEN
#define IDS_TOOLTIP_PROPERTIES
#define IDM_SCAN_HARDWARE
#define IDS_TOOLTIP_DISABLE
#define IDS_HINT_DEV_BY_TYPE
#define IDS_HINT_UNINSTALL
#define IDS_TOOLTIP_UPDATE
#define IDS_HINT_RES_BY_TYPE
#define IDM_UNINSTALL_DRV
#define IDS_HINT_RES_BY_CONN
#define IDS_TOOLTIP_ENABLE
#define IDS_HINT_PROPERTIES
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define InterlockedCompareExchange
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
unsigned __int3264 UINT_PTR
#define WS_OVERLAPPEDWINDOW
#define TB_SETEXTENDEDSTYLE
struct tagINITCOMMONCONTROLSEX INITCOMMONCONTROLSEX
#define TB_BUTTONSTRUCTSIZE
#define TBSTYLE_EX_HIDECLIPPEDBUTTONS
BOOL WINAPI ShellAboutW(HWND hWnd, LPCWSTR szApp, LPCWSTR szOtherStuff, HICON hIcon)
TW_UINT32 TW_UINT16 TW_UINT16 MSG
_In_ HFONT _Out_ PUINT Height
HMENU WINAPI CreatePopupMenu(void)
BOOL WINAPI TranslateMessage(_In_ const MSG *)
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
UINT WINAPI GetMenuState(_In_ HMENU, _In_ UINT, _In_ UINT)
int WINAPI GetMenuItemCount(_In_opt_ HMENU)
BOOL WINAPI GetMessageW(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT)
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WS_EX_RIGHTSCROLLBAR
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
BOOL WINAPI DeleteMenu(_In_ HMENU, _In_ UINT, _In_ UINT)
BOOL WINAPI TrackPopupMenuEx(_In_ HMENU, _In_ UINT, _In_ int, _In_ int, _In_ HWND, _In_opt_ LPTPMPARAMS)
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
DWORD WINAPI CheckMenuItem(_In_ HMENU, _In_ UINT, _In_ UINT)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
HMENU WINAPI GetSubMenu(_In_ HMENU, _In_ int)
HWND WINAPI CreateWindowExW(_In_ DWORD dwExStyle, _In_opt_ LPCWSTR lpClassName, _In_opt_ LPCWSTR lpWindowName, _In_ DWORD dwStyle, _In_ int X, _In_ int Y, _In_ int nWidth, _In_ int nHeight, _In_opt_ HWND hWndParent, _In_opt_ HMENU hMenu, _In_opt_ HINSTANCE hInstance, _In_opt_ LPVOID lpParam)
struct tagNMHDR * LPNMHDR
ATOM WINAPI RegisterClassExW(_In_ CONST WNDCLASSEXW *)
BOOL WINAPI GetMenuItemRect(_In_opt_ HWND, _In_ HMENU, _In_ UINT, _Out_ LPRECT)
BOOL WINAPI CheckMenuRadioItem(_In_ HMENU, _In_ UINT, _In_ UINT, _In_ UINT, _In_ UINT)
BOOL WINAPI DestroyMenu(_In_ HMENU)
LRESULT WINAPI DispatchMessageW(_In_ const MSG *)
struct _WNDCLASSEXW WNDCLASSEXW
BOOL WINAPI UnregisterClassW(_In_ LPCWSTR, HINSTANCE)
#define MAKEINTRESOURCEW(i)
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)
BOOL WINAPI DestroyWindow(_In_ HWND)
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE hInstance, _In_ LPCWSTR lpIconName)
int WINAPI GetSystemMetrics(_In_ int)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HMENU WINAPI GetMenu(_In_ HWND)