11#define NC_PREVIEW_MSGBOX_HALF_WIDTH 75
12#define NC_PREVIEW_MSGBOX_OFFSET_X -29
13#define NC_PREVIEW_MSGBOX_OFFSET_Y 71
219 INT captionBtnWidth, captionBtnHeight, iPartId,
i;
230 if (pwndData ==
NULL)
241 rcCurrent.
top = rcCurrent.
left = 0;
253 captionBtnWidth =
MulDiv(ButtonSize.
cx, buttonHeight, ButtonSize.
cy);
255 captionBtnHeight = buttonHeight - 4;
256 captionBtnWidth -= 4;
261 rcCurrent.
right - captionBtnWidth,
264 rcCurrent.
top + captionBtnHeight);
346 if (htHot == htCurrect)
348 if (htDown == htCurrect)
397 rcPart = *prcCurrent;
425 rcPart.
left += IconWidth + 4;
441 rcPart = *prcCurrent;
447 rcPart = *prcCurrent;
453 rcPart = *prcCurrent;
539 RECT ParentClientRect;
542 rcPart = *prcCurrent;
576 if (bDoDoubleBuffering)
579 if (bDoDoubleBuffering)
623 rcCurrent =
context.wi.rcWindow;
647 if (pwndData ==
NULL)
701 if (pwndData ==
NULL)
756 if (pwndData ==
NULL)
956 RECT ParentRect, TempRect = WindowRect, TempRect2 = WindowRect;
975 TempRect.
top = TempRect2.top;
976 TempRect.
bottom = TempRect2.bottom;
992 RECT TempRect = WindowRect;
1003 RECT TempRect = WindowRect;
1104 DWORD dwStyle = pcontext->wi.dwStyle;
1105 DWORD dwExStyle = pcontext->wi.dwExStyle;
1109 RECT rcWindowPrev = { pcontext->wi.rcWindow.
left, pcontext->wi.rcWindow.top, pcontext->wi.rcWindow.right, pcontext->wi.rcWindow.bottom };
1110 RECT rcClientPrev = { pcontext->wi.rcClient.
left, pcontext->wi.rcClient.top, pcontext->wi.rcClient.right, pcontext->wi.rcClient.bottom };
1113 pcontext->wi.rcWindow = rcWindowNew;
1121 dummyScrollInfo.
cbSize =
sizeof(dummyScrollInfo);
1123 dummyScrollInfo.
nMin = 0;
1124 dummyScrollInfo.
nMax = rcWindowNew.
bottom - rcWindowNew.
top;
1125 dummyScrollInfo.
nPos = 0;
1131 INT offsetX = -rcWindowNew.
left;
1132 INT offsetY = -rcWindowNew.
top;
1136 INT leftBorderInset = pcontext->wi.cxWindowBorders;
1137 INT titleBarInset = pcontext->CaptionHeight;
1138 INT rightBorderInset = pcontext->wi.cxWindowBorders;
1139 INT bottomBorderInset = pcontext->wi.cyWindowBorders;
1144 rcClientNew.
left += leftBorderInset;
1145 rcClientNew.
top += titleBarInset;
1146 rcClientNew.
right -= rightBorderInset;
1147 rcClientNew.
bottom -= bottomBorderInset;
1149 pcontext->wi.rcClient = rcClientNew;
1153 pcontext->wi.dwStyle = dwStyle;
1158 sbi.
cbSize =
sizeof(sbi);
1163 rcClientNew.
right -= scWidth;
1171 pcontext->wi.rcClient = rcClientNew;
1173 OffsetRect(&rcClientNew, -pcontext->wi.rcWindow.
left, -pcontext->wi.rcWindow.top);
1179 pcontext->wi.rcWindow = rcWindowPrev;
1180 pcontext->wi.rcClient = rcClientPrev;
1183 if (prcClient !=
NULL)
1185 prcClient->left = rcClientNew.
left;
1186 prcClient->top = rcClientNew.
top;
1187 prcClient->right = rcClientNew.
right;
1188 prcClient->bottom = rcClientNew.
bottom;
1199 size_t iStrSize = 0;
1207 wcsncpy(lpszDestBuf, lpszResourceString, iStrSize);
1221 PNONCLIENTMETRICSW pncMetrics,
1233 memset(&DummyPreviewWindowClass, 0,
sizeof(DummyPreviewWindowClass));
1234 DummyPreviewWindowClass.
cbSize =
sizeof(DummyPreviewWindowClass);
1235 DummyPreviewWindowClass.
lpszClassName =
L"DummyPreviewWindowClass";
1242 hwndDummy =
CreateWindowExW(
WS_EX_DLGMODALFRAME,
L"DummyPreviewWindowClass",
NULL,
WS_OVERLAPPEDWINDOW |
WS_VSCROLL, 30, 30, 300, 150, 0, 0,
hDllInst,
NULL);
1246 hres =
OpenThemeFile(pszThemeFileName, pszColorName, pszSizeName, &hThemeFile,0);
1266 INT previewWidth = rcAdjPreview.
right - rcAdjPreview.
left;
1267 INT previewHeight = rcAdjPreview.
bottom - rcAdjPreview.
top;
1279 RECT rcWindowClient;
1293 DTTOPTS dttOpts = {
sizeof(dttOpts) };
1294 dttOpts.dwFlags = DTT_TEXTCOLOR;
1310 INT msgBoxHCenter = rcAdjPreview.
left + (previewWidth / 2);
1311 INT msgBoxVCenter = rcAdjPreview.
top + (previewHeight / 2);
1318 INT btnCenterH = rcWindowClient.
left + ((rcWindowClient.
right - rcWindowClient.
left) / 2);
1319 INT btnCenterV = rcWindowClient.
top + ((rcWindowClient.
bottom - rcWindowClient.
top) / 2);
1320 RECT rcBtn = {btnCenterH - 40, btnCenterV - 15, btnCenterH + 40, btnCenterV + 15};
ACPI_PHYSICAL_ADDRESS ACPI_SIZE BOOLEAN Warn UINT32 *TableIdx UINT32 ACPI_TABLE_HEADER *OutTableHeader ACPI_TABLE_HEADER **OutTable ACPI_HANDLE UINT32 ACPI_WALK_CALLBACK ACPI_WALK_CALLBACK void void **ReturnValue UINT32 ACPI_BUFFER *RetPathPtr ACPI_OBJECT_HANDLER void *Data ACPI_OBJECT_HANDLER void **Data ACPI_STRING ACPI_OBJECT_LIST ACPI_BUFFER *ReturnObjectBuffer ACPI_DEVICE_INFO **ReturnBuffer ACPI_HANDLE Parent
#define HeapFree(x, y, z)
HRESULT WINAPI DrawThemeTextEx(_In_ HTHEME hTheme, _In_ HDC hdc, _In_ int iPartId, _In_ int iStateId, _In_ LPCWSTR pszText, _In_ int iCharCount, _In_ DWORD dwTextFlags, _Inout_ LPRECT pRect, _In_ const DTTOPTS *options)
HRESULT WINAPI DrawThemeBackground(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, const RECT *pRect, const RECT *pClipRect)
HRESULT WINAPI GetThemePartSize(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, RECT *prc, THEMESIZE eSize, SIZE *psz)
HRESULT WINAPI DrawThemeText(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, LPCWSTR pszText, int iCharCount, DWORD dwTextFlags, DWORD dwTextFlags2, const RECT *pRect)
COLORREF WINAPI GetThemeSysColor(HTHEME hTheme, int iColorID)
HRESULT WINAPI GetThemeSysFont(HTHEME hTheme, int iFontID, LOGFONTW *plf)
HBRUSH WINAPI GetThemeSysColorBrush(HTHEME hTheme, int iColorID)
int WINAPI GetThemeSysSize(HTHEME hTheme, int iSizeID)
static void ThemePaintWindow(PDRAW_CONTEXT pcontext, RECT *prcCurrent, BOOL bDoDoubleBuffering)
static void ThemeDrawScrollBarsGrip(PDRAW_CONTEXT pcontext, RECT *prcCurrent)
static BOOL IsWindowActive(HWND hWnd, DWORD ExStyle)
static VOID ThemeHandleButton(HWND hWnd, WPARAM wParam)
static void ThemeCalculateCaptionButtonsPosEx(WINDOWINFO *wi, HWND hWnd, HTHEME htheme, INT buttonHeight)
static void ThemeDrawCaptionButtons(PDRAW_CONTEXT pcontext, DWORD htHot, DWORD htDown)
void ThemeCleanupDrawContext(PDRAW_CONTEXT pcontext)
static void ThemeStartBufferedPaint(PDRAW_CONTEXT pcontext, int cx, int cy)
static void ThemeDrawCaption(PDRAW_CONTEXT pcontext, RECT *prcCurrent)
#define NC_PREVIEW_MSGBOX_HALF_WIDTH
static BOOL UserHasWindowEdge(DWORD Style, DWORD ExStyle)
HRESULT WINAPI DrawNCPreview(HDC hDC, DWORD DNCP_Flag, LPRECT prcPreview, LPCWSTR pszThemeFileName, LPCWSTR pszColorName, LPCWSTR pszSizeName, PNONCLIENTMETRICSW pncMetrics, COLORREF *lpaRgbValues)
static HICON UserGetWindowIcon(PDRAW_CONTEXT pcontext)
#define NC_PREVIEW_MSGBOX_OFFSET_Y
static void ThemeDrawCaptionButton(PDRAW_CONTEXT pcontext, RECT *prcCurrent, CAPTIONBUTTON buttonId, INT iStateId)
static DWORD ThemeGetButtonState(DWORD htCurrect, DWORD htHot, DWORD htDown, BOOL Active)
void ThemeInitDrawContext(PDRAW_CONTEXT pcontext, HWND hWnd, HRGN hRgn)
static void ThemeDrawBorders(PDRAW_CONTEXT pcontext, RECT *prcCurrent)
static void DrawClassicFrame(PDRAW_CONTEXT context, RECT *prcCurrent)
LRESULT CALLBACK ThemeWndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam, WNDPROC DefWndProc)
static void ThemeEndBufferedPaint(PDRAW_CONTEXT pcontext, int x, int y, int cx, int cy)
VOID SetWindowResourceText(_In_ HWND hwnd, _In_ UINT uID)
static LRESULT ThemeHandleNcMouseLeave(HWND hWnd)
void ThemeCalculateCaptionButtonsPos(HWND hWnd, HTHEME htheme)
HRESULT WINAPI ThemeDrawCaptionText(PDRAW_CONTEXT pcontext, RECT *pRect, int iPartId, int iStateId)
BOOL IsScrollBarVisible(HWND hWnd, INT hBar)
static LRESULT ThemeHandleNCPaint(HWND hWnd, HRGN hRgn)
static LRESULT ThemeHandleNcMouseMove(HWND hWnd, DWORD ht, POINT *pt)
static LRESULT DefWndNCHitTest(HWND hWnd, POINT Point)
static void ThemeDrawMenuBar(PDRAW_CONTEXT pcontext, RECT *prcCurrent)
#define NC_PREVIEW_MSGBOX_OFFSET_X
static void DrawWindowForNCPreview(_In_ HDC hDC, _In_ PDRAW_CONTEXT pcontext, _In_ INT left, _In_ INT top, _In_ INT right, _In_ INT bottom, _In_ INT clientAreaColor, _Out_opt_ LPRECT prcClient)
HRESULT WINAPI GetThemeFont(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, int iPropId, LOGFONTW *pFont)
HRESULT WINAPI GetThemeMargins(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, int iPropId, RECT *prc, MARGINS *pMargins)
HRESULT WINAPI GetThemeEnumValue(HTHEME hTheme, int iPartId, int iStateId, int iPropId, int *piVal)
HTHEME WINAPI OpenThemeDataFromFile(HTHEMEFILE hThemeFile, HWND hwnd, LPCWSTR pszClassList, DWORD flags)
HRESULT WINAPI OpenThemeFile(LPCWSTR pszThemeFileName, LPCWSTR pszColorName, LPCWSTR pszSizeName, HTHEMEFILE *hThemeFile, DWORD unknown)
HRESULT WINAPI CloseThemeData(HTHEME hTheme)
unsigned short(__cdecl typeof(TIFFCurrentDirectory))(struct tiff *)
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)
int align(int length, int align)
GLint GLint GLint GLint GLint x
GLint GLint GLint GLint GLint GLint y
GLdouble GLdouble GLdouble GLdouble top
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 const struct newhuff ht[]
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
static HTHEME(WINAPI *pOpenThemeDataEx)(HWND
INT WINAPI MulDiv(INT nNumber, INT nNumerator, INT nDenominator)
#define WS_OVERLAPPEDWINDOW
#define WS_EX_DLGMODALFRAME
_Out_opt_ int _Out_opt_ int * cy
struct tagTRACKMOUSEEVENT TRACKMOUSEEVENT
_CRTIMP wchar_t *__cdecl wcsncpy(wchar_t *_Dest, const wchar_t *_Source, size_t _Count)
HTHEME GetNCScrollbarTheme(HWND hWnd, DWORD style)
HTHEME GetNCCaptionTheme(HWND hWnd, DWORD style)
PWND_DATA ThemeGetWndData(HWND hWnd)
TW_UINT32 TW_UINT16 TW_UINT16 MSG
#define WM_NCUAHDRAWCAPTION
BOOL WINAPI PaintMenuBar(HWND hWnd, HDC hDC, ULONG left, ULONG right, ULONG top, BOOL bActive)
#define WM_NCUAHDRAWFRAME
_In_ HFONT _Out_ PUINT _Out_ PUINT Width
_In_ HFONT _Out_ PUINT Height
@ BUTTON_INACTIVE_DISABLED
@ BUTTON_INACTIVE_PRESSED
#define HAS_MENU(hwnd, style)
#define HASSIZEGRIP(Style, ExStyle, ParentStyle, WindowRect, ParentClientRect)
#define TMT_CONTENTMARGINS
#define TMT_CONTENTALIGNMENT
#define SelectFont(hdc, hfont)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
BOOL WINAPI SetViewportOrgEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT)
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
BOOL WINAPI PatBlt(_In_ 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)
HFONT WINAPI CreateFontIndirectW(_In_ const LOGFONTW *)
COLORREF WINAPI SetTextColor(_In_ HDC, _In_ COLORREF)
HRGN WINAPI CreateRectRgnIndirect(_In_ LPCRECT)
HWND WINAPI SetCapture(_In_ HWND hWnd)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
#define SendMessageTimeout
#define COLOR_INACTIVECAPTIONTEXT
BOOL WINAPI ReleaseCapture(void)
#define COLOR_WINDOWFRAME
HWND WINAPI GetForegroundWindow(void)
UINT WINAPI GetMenuState(_In_ HMENU, _In_ UINT, _In_ UINT)
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI GetMessageW(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT)
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI GetWindowInfo(_In_ HWND, _Inout_ PWINDOWINFO)
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
HBRUSH WINAPI GetSysColorBrush(_In_ int)
LONG WINAPI GetWindowLongW(_In_ HWND, _In_ int)
HDC WINAPI GetDCEx(_In_opt_ HWND, _In_opt_ HRGN, _In_ DWORD)
BOOL WINAPI TrackMouseEvent(_Inout_ LPTRACKMOUSEEVENT)
HMENU WINAPI GetSystemMenu(_In_ HWND, _In_ BOOL)
BOOL WINAPI SetWindowTextW(_In_ HWND, _In_opt_ LPCWSTR)
BOOL WINAPI PtInRect(_In_ LPCRECT, _In_ POINT)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI DrawEdge(_In_ HDC, _Inout_ LPRECT, _In_ UINT, _In_ UINT)
BOOL WINAPI IsChild(_In_ HWND, _In_ HWND)
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)
#define SIF_DISABLENOSCROLL
BOOL WINAPI DrawIconEx(_In_ HDC, _In_ int, _In_ int, _In_ HICON, _In_ int, _In_ int, _In_ UINT, _In_opt_ HBRUSH, _In_ UINT)
ATOM WINAPI RegisterClassExW(_In_ CONST WNDCLASSEXW *)
#define COLOR_ACTIVEBORDER
#define STATE_SYSTEM_OFFSCREEN
HWND WINAPI GetParent(_In_ HWND)
struct tagSCROLLBARINFO SCROLLBARINFO
BOOL WINAPI OffsetRect(_Inout_ LPRECT, _In_ int, _In_ int)
int WINAPI SetScrollInfo(_In_ HWND, _In_ int, _In_ LPCSCROLLINFO, _In_ BOOL)
BOOL WINAPI UnregisterClassW(_In_ LPCWSTR, HINSTANCE)
#define WS_EX_LEFTSCROLLBAR
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
INT WINAPI InternalGetWindowText(_In_ HWND hWnd, _Out_writes_to_(cchMaxCount, return+1) LPWSTR pString, _In_ int cchMaxCount)
BOOL WINAPI InflateRect(_Inout_ LPRECT, _In_ int, _In_ int)
#define COLOR_INACTIVEBORDER
#define COLOR_CAPTIONTEXT
BOOL WINAPI DestroyWindow(_In_ HWND)
BOOL WINAPI EnableScrollBar(_In_ HWND, _In_ UINT, _In_ UINT)
BOOL WINAPI GetScrollBarInfo(_In_ HWND, _In_ LONG, _Inout_ PSCROLLBARINFO)
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)
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)
BOOL WINAPI ScreenToClient(_In_ HWND, _Inout_ LPPOINT)
_In_ ULONG _In_ BOOLEAN Active