mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 19:26:29 +00:00
[Desk|User32|UXTheme]
Silence GCC 4.6 "variable 'foo' set but not used [-Werror=unused-but-set-variable]" warnings/errors. svn path=/trunk/; revision=53800
This commit is contained in:
parent
f412d3c1f7
commit
2625559397
7 changed files with 19 additions and 22 deletions
|
@ -88,11 +88,8 @@ DisplayAdvancedSettings(HWND hWndParent, PDISPLAY_DEVICE_ENTRY DisplayDevice)
|
||||||
IDataObject *pdo;
|
IDataObject *pdo;
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
HMODULE hShell32 = NULL;
|
HMODULE hShell32 = NULL;
|
||||||
#endif
|
|
||||||
CPSEAE msvc_SHCreatePropSheetExtArrayEx;
|
CPSEAE msvc_SHCreatePropSheetExtArrayEx;
|
||||||
|
#endif
|
||||||
/* silence gcc warning */
|
|
||||||
msvc_SHCreatePropSheetExtArrayEx = NULL;
|
|
||||||
|
|
||||||
/* FIXME: Build the "%s and %s" caption string for the monitor and adapter name */
|
/* FIXME: Build the "%s and %s" caption string for the monitor and adapter name */
|
||||||
szCaption[0] = _T('\0');
|
szCaption[0] = _T('\0');
|
||||||
|
|
|
@ -53,7 +53,7 @@ AppearancePage_ShowColorScemes(GLOBALS *g, HWND hwndColor, INT ThemeId)
|
||||||
static INT_PTR
|
static INT_PTR
|
||||||
AppearancePage_OnInit(HWND hwndDlg)
|
AppearancePage_OnInit(HWND hwndDlg)
|
||||||
{
|
{
|
||||||
INT i, TemplateCount, iListIndex;
|
INT i, /*TemplateCount,*/ iListIndex;
|
||||||
HWND hwndColor, hwndTheme;
|
HWND hwndColor, hwndTheme;
|
||||||
GLOBALS *g;
|
GLOBALS *g;
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ AppearancePage_OnInit(HWND hwndDlg)
|
||||||
|
|
||||||
LoadThemes(g);
|
LoadThemes(g);
|
||||||
|
|
||||||
TemplateCount = LoadSchemePresetEntries(g->strSelectedStyle);
|
/*TemplateCount = */ LoadSchemePresetEntries(g->strSelectedStyle);
|
||||||
|
|
||||||
hwndColor = GetDlgItem(hwndDlg, IDC_APPEARANCE_COLORSCHEME);
|
hwndColor = GetDlgItem(hwndDlg, IDC_APPEARANCE_COLORSCHEME);
|
||||||
g->SchemeId = -1;
|
g->SchemeId = -1;
|
||||||
|
|
|
@ -437,18 +437,18 @@ MyDrawScrollbar(HDC hdc, LPRECT rc, HBRUSH hbrScrollbar, COLOR_SCHEME *scheme)
|
||||||
BOOL
|
BOOL
|
||||||
MyDrawCaptionTemp(HWND hwnd, HDC hdc, const RECT *rect, HFONT hFont, HICON hIcon, LPCWSTR str, UINT uFlags, COLOR_SCHEME *scheme)
|
MyDrawCaptionTemp(HWND hwnd, HDC hdc, const RECT *rect, HFONT hFont, HICON hIcon, LPCWSTR str, UINT uFlags, COLOR_SCHEME *scheme)
|
||||||
{
|
{
|
||||||
ULONG Height;
|
//ULONG Height;
|
||||||
UINT VCenter, Padding;
|
//UINT VCenter, Padding;
|
||||||
LONG ButtonWidth;
|
//LONG ButtonWidth;
|
||||||
HBRUSH hbr;
|
HBRUSH hbr;
|
||||||
HGDIOBJ hFontOld;
|
HGDIOBJ hFontOld;
|
||||||
RECT rc;
|
RECT rc;
|
||||||
|
|
||||||
Height = scheme->Size[SIZE_CAPTION_Y] - 1;
|
//Height = scheme->Size[SIZE_CAPTION_Y] - 1;
|
||||||
VCenter = (rect->bottom - rect->top) / 2;
|
//VCenter = (rect->bottom - rect->top) / 2;
|
||||||
Padding = VCenter - (Height / 2);
|
//Padding = VCenter - (Height / 2);
|
||||||
|
|
||||||
ButtonWidth = scheme->Size[SIZE_SIZE_X] - 2;
|
//ButtonWidth = scheme->Size[SIZE_SIZE_X] - 2;
|
||||||
|
|
||||||
if (uFlags & DC_GRADIENT)
|
if (uFlags & DC_GRADIENT)
|
||||||
{
|
{
|
||||||
|
|
|
@ -684,7 +684,7 @@ MonSelGetMonitorFont(IN OUT PMONITORSELWND infoPtr,
|
||||||
SIZE rcsize;
|
SIZE rcsize;
|
||||||
LOGFONT lf;
|
LOGFONT lf;
|
||||||
HFONT hPrevFont, hFont;
|
HFONT hPrevFont, hFont;
|
||||||
INT len;
|
//INT len;
|
||||||
|
|
||||||
hFont = infoPtr->Monitors[Index].hFont;
|
hFont = infoPtr->Monitors[Index].hFont;
|
||||||
if (hFont == NULL &&
|
if (hFont == NULL &&
|
||||||
|
@ -698,7 +698,7 @@ MonSelGetMonitorFont(IN OUT PMONITORSELWND infoPtr,
|
||||||
(2 * infoPtr->SelectionFrame.cy) - 2;
|
(2 * infoPtr->SelectionFrame.cy) - 2;
|
||||||
rcsize.cy = (rcsize.cy * 60) / 100;
|
rcsize.cy = (rcsize.cy * 60) / 100;
|
||||||
|
|
||||||
len = _tcslen(infoPtr->Monitors[Index].szCaption);
|
//len = _tcslen(infoPtr->Monitors[Index].szCaption);
|
||||||
|
|
||||||
hPrevFont = SelectObject(hDC,
|
hPrevFont = SelectObject(hDC,
|
||||||
infoPtr->hFont);
|
infoPtr->hFont);
|
||||||
|
|
|
@ -434,7 +434,7 @@ HINSTANCE ClientLoadLibrary(PUNICODE_STRING pstrLibName,
|
||||||
{
|
{
|
||||||
HINSTANCE hLibrary;
|
HINSTANCE hLibrary;
|
||||||
PVOID pInitFunction;
|
PVOID pInitFunction;
|
||||||
NTSTATUS Status;
|
//NTSTATUS Status;
|
||||||
ANSI_STRING InitFuncName;
|
ANSI_STRING InitFuncName;
|
||||||
BOOL Result = FALSE;
|
BOOL Result = FALSE;
|
||||||
|
|
||||||
|
@ -467,7 +467,7 @@ HINSTANCE ClientLoadLibrary(PUNICODE_STRING pstrLibName,
|
||||||
/* Initialize the user api hook */
|
/* Initialize the user api hook */
|
||||||
ASSERT(pstrInitFunc->Buffer);
|
ASSERT(pstrInitFunc->Buffer);
|
||||||
|
|
||||||
Status = RtlUnicodeStringToAnsiString(&InitFuncName,
|
/*Status = */ RtlUnicodeStringToAnsiString(&InitFuncName,
|
||||||
pstrInitFunc,
|
pstrInitFunc,
|
||||||
TRUE);
|
TRUE);
|
||||||
|
|
||||||
|
|
|
@ -1756,8 +1756,8 @@ static HBITMAP UXTHEME_DrawThemePartToDib(HTHEME hTheme, HDC hdc, int iPartId, i
|
||||||
static HRGN UXTHEME_RegionFromDibBits(RGBQUAD* pBuffer, RGBQUAD* pclrTransparent, LPCRECT pRect)
|
static HRGN UXTHEME_RegionFromDibBits(RGBQUAD* pBuffer, RGBQUAD* pclrTransparent, LPCRECT pRect)
|
||||||
{
|
{
|
||||||
int x, y, xstart;
|
int x, y, xstart;
|
||||||
int cMaxRgnRects, cRgnDataSize, cRgnRects;
|
|
||||||
#ifdef EXTCREATEREGION_WORKS
|
#ifdef EXTCREATEREGION_WORKS
|
||||||
|
int cMaxRgnRects, cRgnDataSize, cRgnRects;
|
||||||
RECT* prcCurrent;
|
RECT* prcCurrent;
|
||||||
PRGNDATA prgnData;
|
PRGNDATA prgnData;
|
||||||
#else
|
#else
|
||||||
|
@ -1769,12 +1769,12 @@ static HRGN UXTHEME_RegionFromDibBits(RGBQUAD* pBuffer, RGBQUAD* pclrTransparent
|
||||||
pclrCurrent = (PULONG)pBuffer;
|
pclrCurrent = (PULONG)pBuffer;
|
||||||
clrTransparent = *(PULONG)pclrTransparent;
|
clrTransparent = *(PULONG)pclrTransparent;
|
||||||
|
|
||||||
|
#ifdef EXTCREATEREGION_WORKS
|
||||||
/* Create a region and pre-allocate memory enough for 3 spaces in one row*/
|
/* Create a region and pre-allocate memory enough for 3 spaces in one row*/
|
||||||
cRgnRects = 0;
|
cRgnRects = 0;
|
||||||
cMaxRgnRects = 4* (pRect->bottom-pRect->top);
|
cMaxRgnRects = 4* (pRect->bottom-pRect->top);
|
||||||
cRgnDataSize = sizeof(RGNDATA) + cMaxRgnRects * sizeof(RECT);
|
cRgnDataSize = sizeof(RGNDATA) + cMaxRgnRects * sizeof(RECT);
|
||||||
|
|
||||||
#ifdef EXTCREATEREGION_WORKS
|
|
||||||
/* Allocate the region data */
|
/* Allocate the region data */
|
||||||
prgnData = (PRGNDATA)HeapAlloc(GetProcessHeap(), 0, cRgnDataSize);
|
prgnData = (PRGNDATA)HeapAlloc(GetProcessHeap(), 0, cRgnDataSize);
|
||||||
|
|
||||||
|
|
|
@ -736,7 +736,7 @@ static VOID
|
||||||
ThemeHandleButton(HWND hWnd, WPARAM wParam)
|
ThemeHandleButton(HWND hWnd, WPARAM wParam)
|
||||||
{
|
{
|
||||||
MSG Msg;
|
MSG Msg;
|
||||||
BOOL Pressed = TRUE, OldState;
|
BOOL Pressed = TRUE; // , OldState;
|
||||||
WPARAM SCMsg, ht;
|
WPARAM SCMsg, ht;
|
||||||
ULONG Style;
|
ULONG Style;
|
||||||
DRAW_CONTEXT context;
|
DRAW_CONTEXT context;
|
||||||
|
@ -779,7 +779,7 @@ ThemeHandleButton(HWND hWnd, WPARAM wParam)
|
||||||
if (Msg.message != WM_MOUSEMOVE)
|
if (Msg.message != WM_MOUSEMOVE)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
OldState = Pressed;
|
//OldState = Pressed;
|
||||||
ht = SendMessage(hWnd, WM_NCHITTEST, 0, MAKELPARAM(Msg.pt.x, Msg.pt.y));
|
ht = SendMessage(hWnd, WM_NCHITTEST, 0, MAKELPARAM(Msg.pt.x, Msg.pt.y));
|
||||||
Pressed = (ht == wParam);
|
Pressed = (ht == wParam);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue