25#define APPMSG_NOTIFYICON (WM_APP+1)
26#define APPMSG_APPBAR (WM_APP+2)
34#define MAX_LOADSTRING 100
38#define REPAINT_SPEED 100
123 return (
int)
msg.wParam;
241 else if (uEdge < 0 && AppBarConfig.uEdge >= 0)
329 int rcWidth, rcHeight;
337 rcMon =
info.rcMonitor;
341 rcWidth = (
rect->right -
rect->left);
342 rcHeight = (
rect->bottom -
rect->top);
344 if (rcLeft < rcMon.
left)
347 if (rcTop < rcMon.
top)
350 if (rcLeft > (rcMon.
right - rcWidth))
351 rcLeft = (rcMon.
right - rcWidth);
353 if (rcTop > (rcMon.
bottom - rcHeight))
354 rcTop = (rcMon.
bottom - rcHeight);
363 RECT sourceRect, intersectedRect;
364 RECT targetRect, appRect;
369 int AppWidth, AppHeight;
374 desktopHdc =
GetDC(0);
377 AppWidth = (appRect.
right - appRect.
left);
378 AppHeight = (appRect.
bottom - appRect.
top);
382 cinfo.
cbSize =
sizeof(cinfo);
386 targetRect = appRect;
435 if (
IntersectRect(&intersectedRect, &sourceRect, &targetRect))
495 guiInfo.
cbSize =
sizeof(guiInfo);
506#define PointsAreEqual(pt1, pt2) (((pt1).x == (pt2).x) && ((pt1).y == (pt2).y))
556 ptFocus.
x = (activeRect.
left + activeRect.
right) / 2;
557 ptFocus.
y = (activeRect.
top + activeRect.
bottom) / 2;
728 case WM_DISPLAYCHANGE:
931 if (uiZoom < 1 || uiZoom > 9)
#define IDC_INVERTCOLORSCHECK
#define IDC_SHOWMAGNIFIERCHECK
#define IDC_FOLLOWKEYBOARDCHECK
#define IDC_SHOWMAGNIFIER
#define IDC_FOLLOWTEXTEDITINGCHECK
#define IDD_WARNINGDIALOG
#define IDD_DIALOGOPTIONS
#define IDC_FOLLOWMOUSECHECK
#define IDC_SHOWWARNINGCHECK
#define IDC_STARTMINIMIZEDCHECK
BOOL WINAPI InitCommonControlsEx(const INITCOMMONCONTROLSEX *lpInitCtrls)
DWORD WINAPI GetTickCount(VOID)
LANGID WINAPI GetUserDefaultUILanguage(void)
UINT_PTR WINAPI SHAppBarMessage(DWORD msg, PAPPBARDATA data)
static VOID BitBlt(_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Width, _In_ ULONG Height, _In_reads_bytes_(Delta *Height) PUCHAR Buffer, _In_ ULONG BitsPerPixel, _In_ ULONG Delta)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
TCHAR szTitle[MAX_LOADSTRING]
INT_PTR CALLBACK AboutProc(HWND, UINT, WPARAM, LPARAM)
void DoAppBarStuff(DWORD mode)
INT_PTR CALLBACK OptionsProc(HWND, UINT, WPARAM, LPARAM)
void AttachAppBar(INT uEdge)
BOOL InitInstance(HINSTANCE, int)
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM)
#define APPMSG_NOTIFYICON
ATOM MyRegisterClass(HINSTANCE hInstance)
INT_PTR CALLBACK WarningProc(HWND, UINT, WPARAM, LPARAM)
#define PointsAreEqual(pt1, pt2)
void GetBestOverlapWithMonitors(LPRECT rect)
const TCHAR szWindowClass[]
BOOL bRecreateOffscreenDC
void HandleNotifyIconMessage(HWND hWnd, WPARAM wParam, LPARAM lParam)
struct _AppBarConfig_t AppBarConfig
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
HMONITOR WINAPI MonitorFromRect(LPCRECT, DWORD)
static int rop(int rop, int src, int dst)
#define UNREFERENCED_PARAMETER(P)
struct tagINITCOMMONCONTROLSEX INITCOMMONCONTROLSEX
#define ICC_STANDARD_CLASSES
#define ICC_WIN95_CLASSES
#define ABM_WINDOWPOSCHANGED
#define ABN_FULLSCREENAPP
#define ABN_WINDOWARRANGE
TW_UINT32 TW_UINT16 TW_UINT16 MSG
BOOL WINAPI SetProcessDefaultLayout(DWORD dwDefaultLayout)
BOOL WINAPI GetGUIThreadInfo(DWORD, LPGUITHREADINFO)
#define ComboBox_GetLBText(hwndCtl, index, lpszBuffer)
#define ComboBox_GetCurSel(hwndCtl)
HGDIOBJ WINAPI GetStockObject(_In_ int)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
BOOL WINAPI StretchBlt(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_opt_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ DWORD)
HBITMAP WINAPI CreateCompatibleBitmap(_In_ HDC hdc, _In_ INT cx, _In_ INT cy)
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)
BOOL WINAPI DeleteDC(_In_ HDC)
BOOL WINAPI GetCursorInfo(_Inout_ PCURSORINFO)
HWND WINAPI SetCapture(_In_ HWND hWnd)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
BOOL WINAPI TranslateMessage(_In_ const MSG *)
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
BOOL WINAPI ReleaseCapture(void)
BOOL WINAPI GetIconInfo(_In_ HICON, _Out_ PICONINFO)
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define WS_EX_CONTROLPARENT
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
BOOL WINAPI DrawIcon(_In_ HDC, _In_ int, _In_ int, _In_ HICON)
BOOL WINAPI GetCursorPos(_Out_ LPPOINT)
HWND WINAPI GetCapture(void)
BOOL WINAPI ClientToScreen(_In_ HWND, _Inout_ LPPOINT)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
BOOL WINAPI IsIconic(_In_ HWND)
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
HWND WINAPI GetDesktopWindow(void)
UINT WINAPI IsDlgButtonChecked(_In_ HWND, _In_ int)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
HMENU WINAPI GetSubMenu(_In_ HMENU, _In_ int)
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
BOOL WINAPI IntersectRect(_Out_ LPRECT, _In_ LPCRECT, _In_ LPCRECT)
BOOL WINAPI RemoveMenu(_In_ HMENU, _In_ UINT, _In_ UINT)
HDC WINAPI GetDC(_In_opt_ HWND)
BOOL WINAPI InvalidateRgn(_In_ HWND, _In_opt_ HRGN, _In_ BOOL)
BOOL WINAPI DestroyMenu(_In_ HMENU)
BOOL WINAPI OffsetRect(_Inout_ LPRECT, _In_ int, _In_ int)
BOOL WINAPI TrackPopupMenu(_In_ HMENU, _In_ UINT, _In_ int, _In_ int, _Reserved_ int, _In_ HWND, _Reserved_ LPCRECT)
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)
#define SystemParametersInfo
#define SendDlgItemMessage
#define TranslateAccelerator
#define WM_WINDOWPOSCHANGED
BOOL WINAPI DestroyWindow(_In_ HWND)
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
BOOL WINAPI DestroyIcon(_In_ HICON)