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();
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())
385 dynamic_cast<CDeviceNode *>(
Node)->IsDisabled())
397 dynamic_cast<CDeviceNode *>(
Node)->CanDisable() &&
398 !dynamic_cast<CDeviceNode *>(
Node)->IsDisabled())
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;
733 goto HandleDefaultMessage;
754 RetCode =
This->OnSize();
796 goto HandleDefaultMessage;
824 This->RefreshView(
This->m_DeviceView->GetCurrentView(),
true);
837 This->UpdateStatusBar(
true);
843 This->UpdateStatusBar(
false);
864 RetCode =
This->OnDestroy();
870 HandleDefaultMessage:
#define IDS_TOOLTIP_UPDATE
LRESULT OnContext(_In_ LPARAM lParam)
bool Initialize(_In_z_ LPCTSTR lpCaption, _In_ int nCmdShow)
LRESULT OnCommand(_In_ WPARAM wParam, LPARAM lParam)
LRESULT OnNotify(_In_ LPARAM lParam)
BOOL WINAPI TranslateMessage(_In_ const MSG *)
#define TB_BUTTONSTRUCTSIZE
#define IDS_TOOLTIP_DISABLE
#define DBT_DEVNODES_CHANGED
BOOL WINAPI UnregisterClassW(_In_ LPCWSTR, HINSTANCE)
#define TBSTYLE_EX_HIDECLIPPEDBUTTONS
BOOL WINAPI DestroyIcon(_In_ HICON)
VOID Refresh(_In_ ViewType Type, _In_ bool ScanForChanges, _In_ bool UpdateView)
BOOL WINAPI CheckMenuRadioItem(_In_ HMENU, _In_ UINT, _In_ UINT, _In_ UINT, _In_ UINT)
static const MENU_HINT MainMenuHintTable[]
TW_UINT32 TW_UINT16 TW_UINT16 MSG
#define IDS_TOOLTIP_PROPERTIES
BOOL WINAPI TrackPopupMenuEx(_In_ HMENU, _In_ UINT, _In_ int, _In_ int, _In_ HWND, _In_opt_ LPTPMPARAMS)
UINT WINAPI GetMenuState(_In_ HMENU, _In_ UINT, _In_ UINT)
bool StatusBarLoadString(_In_ HWND hStatusBar, _In_ INT PartId, _In_ HINSTANCE hInstance, _In_ UINT uID)
bool CreateActionMenu(_In_ HMENU OwnerMenu, _In_ bool MainMenu)
_In_ ULONG _In_ ULONG State
#define InterlockedCompareExchange
bool CreateStatusBar(void)
struct _WNDCLASSEXW WNDCLASSEXW
_In_ HFONT _Out_ PUINT Height
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
LRESULT OnContextMenu(_In_ LPARAM lParam)
BOOL WINAPI DestroyWindow(_In_ HWND)
struct tagINITCOMMONCONTROLSEX INITCOMMONCONTROLSEX
#define IDS_HINT_SYS_MINIMIZE
struct tagNMHDR * LPNMHDR
static const MENU_HINT SystemMenuHintTable[]
ATOM WINAPI RegisterClassExW(_In_ CONST WNDCLASSEXW *)
void UpdateStatusBar(_In_ bool InMenuLoop)
LRESULT WINAPI DispatchMessageW(_In_ const MSG *)
ViewType GetCurrentView()
#define IDM_UNINSTALL_DRV
int WINAPI GetMenuItemCount(_In_opt_ HMENU)
LRESULT OnDoubleClick(_In_ LPNMHDR NmHdr)
#define IDS_HINT_SHOW_HIDDEN
#define IDS_HINT_UNINSTALL
CNode * GetSelectedNode()
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
CStringT< wchar_t, StrTraitATL< wchar_t, ChTraitsCRT< wchar_t > > > CAtlStringW
VOID DisplayPropertySheet()
LRESULT OnAction(UINT Action)
#define IDS_HINT_SYS_MOVE
#define IDS_HINT_RES_BY_TYPE
BOOL WINAPI DeleteMenu(_In_ HMENU, _In_ UINT, _In_ UINT)
bool RefreshView(_In_ ViewType Type, _In_ bool ScanForChanges)
int WINAPI GetSystemMetrics(_In_ int)
#define IDS_HINT_SYS_RESTORE
LRESULT OnSize(_In_ int x, _In_ int y, _In_ int cx, _In_ int cy)
DWORD WINAPI CheckMenuItem(_In_ HMENU, _In_ UINT, _In_ UINT)
CDeviceView * m_DeviceView
unsigned __int3264 UINT_PTR
#define BTN_SCAN_HARDWARE
bool MainWndMenuHint(_In_ WORD CmdId, _In_ const MENU_HINT *HintArray, _In_ DWORD HintsCount, _In_ UINT DefHintId)
#define IDS_HINT_SYS_SIZE
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)
LRESULT OnCreate(_In_ HWND hwnd)
VOID SetHiddenDevices(_In_ bool ShowHidden)
#define IDS_HINT_DEV_BY_CONN
#define IDS_TOOLTIP_UNINSTALL
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)
BOOL WINAPI InitCommonControlsEx(const INITCOMMONCONTROLSEX *lpInitCtrls)
BOOL WINAPI ShellAboutW(HWND hWnd, LPCWSTR szApp, LPCWSTR szOtherStuff, HICON hIcon)
HMENU WINAPI GetSubMenu(_In_ HMENU, _In_ int)
#define InterlockedExchange
#define BTN_UNINSTALL_DRV
BOOL WINAPI DestroyMenu(_In_ HMENU)
#define WS_EX_RIGHTSCROLLBAR
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
#define IDM_SCAN_HARDWARE
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
static TBBUTTON TbButtons[]
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HINSTANCE g_hThisInstance
static LRESULT CALLBACK MainWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
CAtlStringW m_szMainWndClass
#define IDS_HINT_SYS_MAXIMIZE
BOOL WINAPI GetMessageW(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT)
BOOL WINAPI GetMenuItemRect(_In_opt_ HWND, _In_ HMENU, _In_ UINT, _Out_ LPRECT)
HMENU WINAPI CreatePopupMenu(void)
#define IDS_TOOLTIP_ENABLE
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
bool Create(_In_ HWND hWndParent, _In_ HINSTANCE hInst, _In_opt_z_ LPCWSTR lpMachineName, _In_ int nCmdShow)
#define IDS_HINT_SYS_CLOSE
#define WS_OVERLAPPEDWINDOW
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
#define MAKEINTRESOURCEW(i)
#define IDS_HINT_DEV_BY_TYPE
HINSTANCE g_hParentInstance
HMENU WINAPI GetMenu(_In_ HWND)
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
LRESULT OnRightClick(_In_ LPNMHDR NmHdr)
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
#define TB_SETEXTENDEDSTYLE
#define IDS_HINT_PROPERTIES