[DESK.CPL]: Fix trailing whitespace, some indent + code formatting style.

svn path=/trunk/; revision=73044
This commit is contained in:
Hermès Bélusca-Maïto 2016-10-26 21:14:39 +00:00
parent 682cc491e7
commit 60cf552825
14 changed files with 231 additions and 232 deletions

View file

@ -522,7 +522,7 @@ AdvAppearanceDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
break; break;
case WM_COMMAND: case WM_COMMAND:
if(g == NULL) if (g == NULL)
return TRUE; return TRUE;
switch(LOWORD(wParam)) switch(LOWORD(wParam))
@ -558,7 +558,7 @@ AdvAppearanceDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
if (HIWORD(wParam) == EN_CHANGE) if (HIWORD(wParam) == EN_CHANGE)
{ {
iProperty = g_Assignment[g->CurrentElement].Size; iProperty = g_Assignment[g->CurrentElement].Size;
if(iProperty == -1) if (iProperty == -1)
return TRUE; return TRUE;
iSelection = LOWORD(SendDlgItemMessage(hwndDlg, IDC_ADVAPPEARANCE_SIZE_UD, UDM_GETPOS,0,0L)); iSelection = LOWORD(SendDlgItemMessage(hwndDlg, IDC_ADVAPPEARANCE_SIZE_UD, UDM_GETPOS,0,0L));
@ -566,7 +566,7 @@ AdvAppearanceDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_PREVIEW, PVM_SETSIZE, iProperty, iSelection); SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_PREVIEW, PVM_SETSIZE, iProperty, iSelection);
iProperty = g_Assignment[g->CurrentElement].Size2; iProperty = g_Assignment[g->CurrentElement].Size2;
if(iProperty != -1) if (iProperty != -1)
SchemeSetMetric(&g->SchemeAdv, iProperty, iSelection); SchemeSetMetric(&g->SchemeAdv, iProperty, iSelection);
} }
break; break;
@ -575,7 +575,7 @@ AdvAppearanceDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
if (HIWORD(wParam) == CBN_SELCHANGE) if (HIWORD(wParam) == CBN_SELCHANGE)
{ {
iProperty = g_Assignment[g->CurrentElement].Font; iProperty = g_Assignment[g->CurrentElement].Font;
if(iProperty == -1) if (iProperty == -1)
return TRUE; return TRUE;
plfFont = SchemeGetFont(&g->SchemeAdv, iProperty); plfFont = SchemeGetFont(&g->SchemeAdv, iProperty);
@ -590,7 +590,7 @@ AdvAppearanceDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
HDC hdcDlg; HDC hdcDlg;
iProperty = g_Assignment[g->CurrentElement].Font; iProperty = g_Assignment[g->CurrentElement].Font;
if(iProperty == -1) if (iProperty == -1)
return TRUE; return TRUE;
hdcDlg = GetDC(hwndDlg); hdcDlg = GetDC(hwndDlg);
@ -608,7 +608,7 @@ AdvAppearanceDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
if (HIWORD(wParam) == BN_CLICKED) if (HIWORD(wParam) == BN_CLICKED)
{ {
iProperty = g_Assignment[g->CurrentElement].Font; iProperty = g_Assignment[g->CurrentElement].Font;
if(iProperty == -1) if (iProperty == -1)
return TRUE; return TRUE;
plfFont = SchemeGetFont(&g->SchemeAdv, iProperty); plfFont = SchemeGetFont(&g->SchemeAdv, iProperty);
@ -622,7 +622,7 @@ AdvAppearanceDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
if (HIWORD(wParam) == BN_CLICKED) if (HIWORD(wParam) == BN_CLICKED)
{ {
iProperty = g_Assignment[g->CurrentElement].Font; iProperty = g_Assignment[g->CurrentElement].Font;
if(iProperty == -1) if (iProperty == -1)
return TRUE; return TRUE;
plfFont = SchemeGetFont(&g->SchemeAdv, iProperty); plfFont = SchemeGetFont(&g->SchemeAdv, iProperty);

View file

@ -111,7 +111,7 @@ DisplayAdvancedSettings(HWND hWndParent, PDISPLAY_DEVICE_ENTRY DisplayDevice)
#ifdef _MSC_VER #ifdef _MSC_VER
hShell32 = LoadLibrary(_T("shell32.dll")); hShell32 = LoadLibrary(_T("shell32.dll"));
if(hShell32 == NULL) if (hShell32 == NULL)
return FALSE; return FALSE;
msvc_SHCreatePropSheetExtArrayEx = (CPSEAE)GetProcAddress(hShell32, (LPCSTR)194); msvc_SHCreatePropSheetExtArrayEx = (CPSEAE)GetProcAddress(hShell32, (LPCSTR)194);
hpsxaDev = msvc_SHCreatePropSheetExtArrayEx(HKEY_LOCAL_MACHINE, REGSTR_PATH_CONTROLSFOLDER TEXT("\\Device"), MAX_ADVANCED_PAGES - psh.nPages, pdo); hpsxaDev = msvc_SHCreatePropSheetExtArrayEx(HKEY_LOCAL_MACHINE, REGSTR_PATH_CONTROLSFOLDER TEXT("\\Device"), MAX_ADVANCED_PAGES - psh.nPages, pdo);

View file

@ -203,7 +203,7 @@ AppearancePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
break; break;
case WM_COMMAND: case WM_COMMAND:
if(g == NULL || g->bInitializing) if (g == NULL || g->bInitializing)
return FALSE; return FALSE;
switch (LOWORD(wParam)) switch (LOWORD(wParam))
@ -282,7 +282,7 @@ AppearancePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{ {
g->ActiveTheme.Size = (PTHEME_STYLE)GetSelectedData(hwndDlg, IDC_APPEARANCE_SIZE); g->ActiveTheme.Size = (PTHEME_STYLE)GetSelectedData(hwndDlg, IDC_APPEARANCE_SIZE);
g->bSchemeChanged = TRUE; g->bSchemeChanged = TRUE;
if(g->ActiveTheme.ThemeActive) if (g->ActiveTheme.ThemeActive)
g->bThemeChanged = TRUE; g->bThemeChanged = TRUE;
PropSheet_Changed(GetParent(hwndDlg), hwndDlg); PropSheet_Changed(GetParent(hwndDlg), hwndDlg);

View file

@ -258,7 +258,7 @@ AddWallpapersFromDirectory(UINT uCounter, HWND hwndBackgroundList, BackgroundIte
pData->listViewItemCount++; pData->listViewItemCount++;
} }
if(!FindNextFile(hFind, &fd)) if (!FindNextFile(hFind, &fd))
break; break;
} }
@ -1111,9 +1111,9 @@ BackgroundPageProc(HWND hwndDlg,
switch(lpnm->code) switch(lpnm->code)
{ {
case PSN_APPLY: case PSN_APPLY:
if(pData->bWallpaperChanged) if (pData->bWallpaperChanged)
SetWallpaper(pData); SetWallpaper(pData);
if(pData->bClrBackgroundChanged) if (pData->bClrBackgroundChanged)
SetDesktopBackColor(hwndDlg, pData); SetDesktopBackColor(hwndDlg, pData);
SendMessage(HWND_BROADCAST, WM_SETTINGCHANGE, 0, (LPARAM)_T("")); SendMessage(HWND_BROADCAST, WM_SETTINGCHANGE, 0, (LPARAM)_T(""));
return TRUE; return TRUE;

View file

@ -38,7 +38,7 @@ DisplayClassInstaller(
return ERROR_DI_DO_DEFAULT; return ERROR_DI_DO_DEFAULT;
/* Set DI_DONOTCALLCONFIGMG flag */ /* Set DI_DONOTCALLCONFIGMG flag */
InstallParams.cbSize = sizeof(SP_DEVINSTALL_PARAMS); InstallParams.cbSize = sizeof(InstallParams);
result = SetupDiGetDeviceInstallParams(DeviceInfoSet, DeviceInfoData, &InstallParams); result = SetupDiGetDeviceInstallParams(DeviceInfoSet, DeviceInfoData, &InstallParams);
if (!result) if (!result)
{ {
@ -67,7 +67,7 @@ DisplayClassInstaller(
} }
/* Get .inf file name and section name */ /* Get .inf file name and section name */
DriverInfoData.cbSize = sizeof(SP_DRVINFO_DATA); DriverInfoData.cbSize = sizeof(DriverInfoData);
result = SetupDiGetSelectedDriver(DeviceInfoSet, DeviceInfoData, &DriverInfoData); result = SetupDiGetSelectedDriver(DeviceInfoSet, DeviceInfoData, &DriverInfoData);
if (!result) if (!result)
{ {
@ -76,11 +76,10 @@ DisplayClassInstaller(
goto cleanup; goto cleanup;
} }
DriverInfoDetailData.cbSize = sizeof(SP_DRVINFO_DETAIL_DATA); DriverInfoDetailData.cbSize = sizeof(DriverInfoDetailData);
result = SetupDiGetDriverInfoDetail( result = SetupDiGetDriverInfoDetail(DeviceInfoSet, DeviceInfoData,
DeviceInfoSet, DeviceInfoData, &DriverInfoData, &DriverInfoDetailData,
&DriverInfoData, &DriverInfoDetailData, sizeof(DriverInfoDetailData), NULL);
sizeof(SP_DRVINFO_DETAIL_DATA), NULL);
if (!result && GetLastError() != ERROR_INSUFFICIENT_BUFFER) if (!result && GetLastError() != ERROR_INSUFFICIENT_BUFFER)
{ {
rc = GetLastError(); rc = GetLastError();

View file

@ -81,16 +81,16 @@ MyIntDrawRectEdge(HDC hdc, LPRECT rc, UINT uType, UINT uFlags, COLOR_SCHEME *sch
RBInnerI = RBInnerNormal[uType & (BDR_INNER|BDR_OUTER)]; RBInnerI = RBInnerNormal[uType & (BDR_INNER|BDR_OUTER)];
RBOuterI = RBOuterNormal[uType & (BDR_INNER|BDR_OUTER)]; RBOuterI = RBOuterNormal[uType & (BDR_INNER|BDR_OUTER)];
if((uFlags & BF_BOTTOMLEFT) == BF_BOTTOMLEFT) if ((uFlags & BF_BOTTOMLEFT) == BF_BOTTOMLEFT)
LBpenplus = 1; LBpenplus = 1;
if((uFlags & BF_TOPRIGHT) == BF_TOPRIGHT) if ((uFlags & BF_TOPRIGHT) == BF_TOPRIGHT)
RTpenplus = 1; RTpenplus = 1;
if((uFlags & BF_BOTTOMRIGHT) == BF_BOTTOMRIGHT) if ((uFlags & BF_BOTTOMRIGHT) == BF_BOTTOMRIGHT)
RBpenplus = 1; RBpenplus = 1;
if((uFlags & BF_TOPLEFT) == BF_TOPLEFT) if ((uFlags & BF_TOPLEFT) == BF_TOPLEFT)
LTpenplus = 1; LTpenplus = 1;
if((uFlags & MY_BF_ACTIVEBORDER)) if ((uFlags & MY_BF_ACTIVEBORDER))
hbr = CreateSolidBrush(scheme->crColor[COLOR_ACTIVEBORDER]); hbr = CreateSolidBrush(scheme->crColor[COLOR_ACTIVEBORDER]);
else else
hbr = CreateSolidBrush(scheme->crColor[COLOR_BTNFACE]); hbr = CreateSolidBrush(scheme->crColor[COLOR_BTNFACE]);
@ -101,34 +101,34 @@ MyIntDrawRectEdge(HDC hdc, LPRECT rc, UINT uType, UINT uFlags, COLOR_SCHEME *sch
MoveToEx(hdc, 0, 0, &SavePoint); MoveToEx(hdc, 0, 0, &SavePoint);
/* Draw the outer edge */ /* Draw the outer edge */
if(LTOuterI != -1) if (LTOuterI != -1)
{ {
LTOuterPen = GetStockObject(DC_PEN); LTOuterPen = GetStockObject(DC_PEN);
SelectObject(hdc, LTOuterPen); SelectObject(hdc, LTOuterPen);
SetDCPenColor(hdc, scheme->crColor[LTOuterI]); SetDCPenColor(hdc, scheme->crColor[LTOuterI]);
if(uFlags & BF_TOP) if (uFlags & BF_TOP)
{ {
MoveToEx(hdc, InnerRect.left, InnerRect.top, NULL); MoveToEx(hdc, InnerRect.left, InnerRect.top, NULL);
LineTo(hdc, InnerRect.right, InnerRect.top); LineTo(hdc, InnerRect.right, InnerRect.top);
} }
if(uFlags & BF_LEFT) if (uFlags & BF_LEFT)
{ {
MoveToEx(hdc, InnerRect.left, InnerRect.top, NULL); MoveToEx(hdc, InnerRect.left, InnerRect.top, NULL);
LineTo(hdc, InnerRect.left, InnerRect.bottom); LineTo(hdc, InnerRect.left, InnerRect.bottom);
} }
} }
if(RBOuterI != -1) if (RBOuterI != -1)
{ {
RBOuterPen = GetStockObject(DC_PEN); RBOuterPen = GetStockObject(DC_PEN);
SelectObject(hdc, RBOuterPen); SelectObject(hdc, RBOuterPen);
SetDCPenColor(hdc, scheme->crColor[RBOuterI]); SetDCPenColor(hdc, scheme->crColor[RBOuterI]);
if(uFlags & BF_BOTTOM) if (uFlags & BF_BOTTOM)
{ {
MoveToEx(hdc, InnerRect.left, InnerRect.bottom-1, NULL); MoveToEx(hdc, InnerRect.left, InnerRect.bottom-1, NULL);
LineTo(hdc, InnerRect.right, InnerRect.bottom-1); LineTo(hdc, InnerRect.right, InnerRect.bottom-1);
} }
if(uFlags & BF_RIGHT) if (uFlags & BF_RIGHT)
{ {
MoveToEx(hdc, InnerRect.right-1, InnerRect.top, NULL); MoveToEx(hdc, InnerRect.right-1, InnerRect.top, NULL);
LineTo(hdc, InnerRect.right-1, InnerRect.bottom); LineTo(hdc, InnerRect.right-1, InnerRect.bottom);
@ -136,34 +136,34 @@ MyIntDrawRectEdge(HDC hdc, LPRECT rc, UINT uType, UINT uFlags, COLOR_SCHEME *sch
} }
/* Draw the inner edge */ /* Draw the inner edge */
if(LTInnerI != -1) if (LTInnerI != -1)
{ {
LTInnerPen = GetStockObject(DC_PEN); LTInnerPen = GetStockObject(DC_PEN);
SelectObject(hdc, LTInnerPen); SelectObject(hdc, LTInnerPen);
SetDCPenColor(hdc, scheme->crColor[LTInnerI]); SetDCPenColor(hdc, scheme->crColor[LTInnerI]);
if(uFlags & BF_TOP) if (uFlags & BF_TOP)
{ {
MoveToEx(hdc, InnerRect.left+LTpenplus, InnerRect.top+1, NULL); MoveToEx(hdc, InnerRect.left+LTpenplus, InnerRect.top+1, NULL);
LineTo(hdc, InnerRect.right-RTpenplus, InnerRect.top+1); LineTo(hdc, InnerRect.right-RTpenplus, InnerRect.top+1);
} }
if(uFlags & BF_LEFT) if (uFlags & BF_LEFT)
{ {
MoveToEx(hdc, InnerRect.left+1, InnerRect.top+LTpenplus, NULL); MoveToEx(hdc, InnerRect.left+1, InnerRect.top+LTpenplus, NULL);
LineTo(hdc, InnerRect.left+1, InnerRect.bottom-LBpenplus); LineTo(hdc, InnerRect.left+1, InnerRect.bottom-LBpenplus);
} }
} }
if(RBInnerI != -1) if (RBInnerI != -1)
{ {
RBInnerPen = GetStockObject(DC_PEN); RBInnerPen = GetStockObject(DC_PEN);
SelectObject(hdc, RBInnerPen); SelectObject(hdc, RBInnerPen);
SetDCPenColor(hdc, scheme->crColor[RBInnerI]); SetDCPenColor(hdc, scheme->crColor[RBInnerI]);
if(uFlags & BF_BOTTOM) if (uFlags & BF_BOTTOM)
{ {
MoveToEx(hdc, InnerRect.left+LBpenplus, InnerRect.bottom-2, NULL); MoveToEx(hdc, InnerRect.left+LBpenplus, InnerRect.bottom-2, NULL);
LineTo(hdc, InnerRect.right-RBpenplus, InnerRect.bottom-2); LineTo(hdc, InnerRect.right-RBpenplus, InnerRect.bottom-2);
} }
if(uFlags & BF_RIGHT) if (uFlags & BF_RIGHT)
{ {
MoveToEx(hdc, InnerRect.right-2, InnerRect.top+RTpenplus, NULL); MoveToEx(hdc, InnerRect.right-2, InnerRect.top+RTpenplus, NULL);
LineTo(hdc, InnerRect.right-2, InnerRect.bottom-RBpenplus); LineTo(hdc, InnerRect.right-2, InnerRect.bottom-RBpenplus);
@ -175,16 +175,16 @@ MyIntDrawRectEdge(HDC hdc, LPRECT rc, UINT uType, UINT uFlags, COLOR_SCHEME *sch
int add = (LTRBInnerMono[uType & (BDR_INNER|BDR_OUTER)] != -1 ? 1 : 0) int add = (LTRBInnerMono[uType & (BDR_INNER|BDR_OUTER)] != -1 ? 1 : 0)
+ (LTRBOuterMono[uType & (BDR_INNER|BDR_OUTER)] != -1 ? 1 : 0); + (LTRBOuterMono[uType & (BDR_INNER|BDR_OUTER)] != -1 ? 1 : 0);
if(uFlags & BF_LEFT) if (uFlags & BF_LEFT)
InnerRect.left += add; InnerRect.left += add;
if(uFlags & BF_RIGHT) if (uFlags & BF_RIGHT)
InnerRect.right -= add; InnerRect.right -= add;
if(uFlags & BF_TOP) if (uFlags & BF_TOP)
InnerRect.top += add; InnerRect.top += add;
if(uFlags & BF_BOTTOM) if (uFlags & BF_BOTTOM)
InnerRect.bottom -= add; InnerRect.bottom -= add;
if(uFlags & BF_ADJUST) if (uFlags & BF_ADJUST)
*rc = InnerRect; *rc = InnerRect;
} }
@ -198,7 +198,7 @@ static BOOL
MyDrawFrameButton(HDC hdc, LPRECT rc, UINT uState, COLOR_SCHEME *scheme) MyDrawFrameButton(HDC hdc, LPRECT rc, UINT uState, COLOR_SCHEME *scheme)
{ {
UINT edge; UINT edge;
if(uState & (DFCS_PUSHED | DFCS_CHECKED | DFCS_FLAT)) if (uState & (DFCS_PUSHED | DFCS_CHECKED | DFCS_FLAT))
edge = EDGE_SUNKEN; edge = EDGE_SUNKEN;
else else
edge = EDGE_RAISED; edge = EDGE_RAISED;
@ -220,7 +220,7 @@ MyMakeSquareRect(LPRECT src, LPRECT dst)
dst->top += (Height-Width)/2; dst->top += (Height-Width)/2;
dst->bottom = dst->top + SmallDiam; dst->bottom = dst->top + SmallDiam;
} }
else if(Width > Height) /* SmallDiam == Height */ else if (Width > Height) /* SmallDiam == Height */
{ {
dst->left += (Width-Height)/2; dst->left += (Width-Height)/2;
dst->right = dst->left + SmallDiam; dst->right = dst->left + SmallDiam;
@ -259,13 +259,13 @@ MyDrawFrameCaption(HDC dc, LPRECT r, UINT uFlags, COLOR_SCHEME *scheme)
return FALSE; return FALSE;
} }
MyIntDrawRectEdge(dc, r, (uFlags & DFCS_PUSHED) ? EDGE_SUNKEN : EDGE_RAISED, BF_RECT | BF_MIDDLE | BF_SOFT, scheme); MyIntDrawRectEdge(dc, r, (uFlags & DFCS_PUSHED) ? EDGE_SUNKEN : EDGE_RAISED, BF_RECT | BF_MIDDLE | BF_SOFT, scheme);
ZeroMemory(&lf, sizeof(LOGFONT)); ZeroMemory(&lf, sizeof(lf));
MyMakeSquareRect(r, &myr); MyMakeSquareRect(r, &myr);
myr.left += 1; myr.left += 1;
myr.top += 1; myr.top += 1;
myr.right -= 1; myr.right -= 1;
myr.bottom -= 1; myr.bottom -= 1;
if(uFlags & DFCS_PUSHED) if (uFlags & DFCS_PUSHED)
OffsetRect(&myr,1,1); OffsetRect(&myr,1,1);
lf.lfHeight = myr.bottom - myr.top; lf.lfHeight = myr.bottom - myr.top;
lf.lfWidth = 0; lf.lfWidth = 0;
@ -279,7 +279,7 @@ MyDrawFrameCaption(HDC dc, LPRECT r, UINT uFlags, COLOR_SCHEME *scheme)
bkmode = GetBkMode(dc); bkmode = GetBkMode(dc);
/* Set color and drawing mode */ /* Set color and drawing mode */
SetBkMode(dc, TRANSPARENT); SetBkMode(dc, TRANSPARENT);
if(uFlags & DFCS_INACTIVE) if (uFlags & DFCS_INACTIVE)
{ {
/* Draw shadow */ /* Draw shadow */
SetTextColor(dc, scheme->crColor[COLOR_BTNHIGHLIGHT]); SetTextColor(dc, scheme->crColor[COLOR_BTNHIGHLIGHT]);
@ -330,13 +330,13 @@ MyDrawFrameScroll(HDC dc, LPRECT r, UINT uFlags, COLOR_SCHEME *scheme)
return FALSE; return FALSE;
} }
MyIntDrawRectEdge(dc, r, (uFlags & DFCS_PUSHED) ? EDGE_SUNKEN : EDGE_RAISED, (uFlags&DFCS_FLAT) | BF_MIDDLE | BF_RECT, scheme); MyIntDrawRectEdge(dc, r, (uFlags & DFCS_PUSHED) ? EDGE_SUNKEN : EDGE_RAISED, (uFlags&DFCS_FLAT) | BF_MIDDLE | BF_RECT, scheme);
ZeroMemory(&lf, sizeof(LOGFONT)); ZeroMemory(&lf, sizeof(lf));
MyMakeSquareRect(r, &myr); MyMakeSquareRect(r, &myr);
myr.left += 1; myr.left += 1;
myr.top += 1; myr.top += 1;
myr.right -= 1; myr.right -= 1;
myr.bottom -= 1; myr.bottom -= 1;
if(uFlags & DFCS_PUSHED) if (uFlags & DFCS_PUSHED)
OffsetRect(&myr,1,1); OffsetRect(&myr,1,1);
lf.lfHeight = myr.bottom - myr.top; lf.lfHeight = myr.bottom - myr.top;
lf.lfWidth = 0; lf.lfWidth = 0;
@ -350,7 +350,7 @@ MyDrawFrameScroll(HDC dc, LPRECT r, UINT uFlags, COLOR_SCHEME *scheme)
bkmode = GetBkMode(dc); bkmode = GetBkMode(dc);
/* Set color and drawing mode */ /* Set color and drawing mode */
SetBkMode(dc, TRANSPARENT); SetBkMode(dc, TRANSPARENT);
if(uFlags & DFCS_INACTIVE) if (uFlags & DFCS_INACTIVE)
{ {
/* Draw shadow */ /* Draw shadow */
SetTextColor(dc, scheme->crColor[COLOR_BTNHIGHLIGHT]); SetTextColor(dc, scheme->crColor[COLOR_BTNHIGHLIGHT]);
@ -554,7 +554,7 @@ MyDrawMenuBarTemp(HWND Wnd, HDC DC, LPRECT Rect, HMENU Menu, HFONT Font, COLOR_S
bkgnd = (flat_menu ? COLOR_MENUBAR : COLOR_MENU); bkgnd = (flat_menu ? COLOR_MENUBAR : COLOR_MENU);
x = Rect->left; x = Rect->left;
hFontOld = SelectObject(DC, Font); hFontOld = SelectObject(DC, Font);
for(i = 0; i < 3; i++) for (i = 0; i < 3; i++)
{ {
GetMenuStringW(Menu, i, Text, 128, MF_BYPOSITION); GetMenuStringW(Menu, i, Text, 128, MF_BYPOSITION);

View file

@ -698,7 +698,7 @@ MonSelGetMonitorFont(IN OUT PMONITORSELWND infoPtr,
hFont = infoPtr->Monitors[Index].hFont; hFont = infoPtr->Monitors[Index].hFont;
if (hFont == NULL && if (hFont == NULL &&
GetObject(infoPtr->hFont, GetObject(infoPtr->hFont,
sizeof(LOGFONT), sizeof(lf),
&lf) != 0) &lf) != 0)
{ {
rcsize.cx = infoPtr->Monitors[Index].rc.right - infoPtr->Monitors[Index].rc.left - rcsize.cx = infoPtr->Monitors[Index].rc.right - infoPtr->Monitors[Index].rc.left -
@ -1580,9 +1580,9 @@ MonitorSelWndProc(IN HWND hwnd,
case WM_CREATE: case WM_CREATE:
{ {
infoPtr = (PMONITORSELWND) HeapAlloc(GetProcessHeap(), infoPtr = (PMONITORSELWND)HeapAlloc(GetProcessHeap(),
0, 0,
sizeof(MONITORSELWND)); sizeof(MONITORSELWND));
if (infoPtr == NULL) if (infoPtr == NULL)
{ {
Ret = (LRESULT)-1; Ret = (LRESULT)-1;

View file

@ -260,7 +260,7 @@ OnPaint(HWND hwnd, PPREVIEW_DATA pPreviewData)
hdc = BeginPaint(hwnd, &ps); hdc = BeginPaint(hwnd, &ps);
if(pPreviewData->hdcPreview) if (pPreviewData->hdcPreview)
{ {
BitBlt(hdc,0,0, pPreviewData->rcDesktop.right, pPreviewData->rcDesktop.bottom, pPreviewData->hdcPreview, 0,0, SRCCOPY); BitBlt(hdc,0,0, pPreviewData->rcDesktop.right, pPreviewData->rcDesktop.bottom, pPreviewData->hdcPreview, 0,0, SRCCOPY);
EndPaint(hwnd, &ps); EndPaint(hwnd, &ps);
@ -540,7 +540,7 @@ RegisterPreviewControl(IN HINSTANCE hInstance)
{ {
WNDCLASSEX wc = {0}; WNDCLASSEX wc = {0};
wc.cbSize = sizeof(WNDCLASSEX); wc.cbSize = sizeof(wc);
wc.lpfnWndProc = PreviewWndProc; wc.lpfnWndProc = PreviewWndProc;
wc.hInstance = hInstance; wc.hInstance = hInstance;
wc.hCursor = LoadCursor(NULL, IDC_ARROW); wc.hCursor = LoadCursor(NULL, IDC_ARROW);

View file

@ -214,7 +214,7 @@ ScreensaverConfig(HWND hwndDlg, PDATA pData)
ZeroMemory(&si, sizeof(si)); ZeroMemory(&si, sizeof(si));
si.cb = sizeof(si); si.cb = sizeof(si);
ZeroMemory(&pi, sizeof(pi)); ZeroMemory(&pi, sizeof(pi));
if(CreateProcess(NULL, if (CreateProcess(NULL,
szCmdline, szCmdline,
NULL, NULL,
NULL, NULL,
@ -270,7 +270,7 @@ ScreensaverPreview(HWND hwndDlg, PDATA pData)
ZeroMemory(&si, sizeof(si)); ZeroMemory(&si, sizeof(si));
si.cb = sizeof(si); si.cb = sizeof(si);
ZeroMemory(&pi, sizeof(pi)); ZeroMemory(&pi, sizeof(pi));
if(CreateProcess(NULL, if (CreateProcess(NULL,
szCmdline, szCmdline,
NULL, NULL,
NULL, NULL,
@ -760,7 +760,7 @@ ScreenSaverPageProc(HWND hwndDlg,
case IDC_SCREENS_TESTSC: // Screensaver Preview case IDC_SCREENS_TESTSC: // Screensaver Preview
{ {
if(command == BN_CLICKED) if (command == BN_CLICKED)
{ {
ScreensaverPreview(hwndDlg, pData); ScreensaverPreview(hwndDlg, pData);
SetScreenSaverPreviewBox(hwndDlg, pData); SetScreenSaverPreviewBox(hwndDlg, pData);

View file

@ -101,7 +101,7 @@ GetPossibleSettings(IN LPCTSTR DeviceName, OUT DWORD* pSettingsCount, OUT PSETTI
DeleteDC(hDC); DeleteDC(hDC);
/* List all settings */ /* List all settings */
devmode.dmSize = (WORD)sizeof(DEVMODE); devmode.dmSize = (WORD)sizeof(devmode);
devmode.dmDriverExtra = 0; devmode.dmDriverExtra = 0;
if (!EnumDisplaySettingsEx(DeviceName, ENUM_CURRENT_SETTINGS, &devmode, dwFlags)) if (!EnumDisplaySettingsEx(DeviceName, ENUM_CURRENT_SETTINGS, &devmode, dwFlags))
@ -319,7 +319,7 @@ OnInitDialog(IN HWND hwndDlg)
/* Get video cards list */ /* Get video cards list */
pData->DisplayDeviceList = NULL; pData->DisplayDeviceList = NULL;
displayDevice.cb = (DWORD)sizeof(DISPLAY_DEVICE); displayDevice.cb = sizeof(displayDevice);
while (EnumDisplayDevices(NULL, iDevNum, &displayDevice, 0x1)) while (EnumDisplayDevices(NULL, iDevNum, &displayDevice, 0x1))
{ {
if ((displayDevice.StateFlags & DISPLAY_DEVICE_ATTACHED_TO_DESKTOP) != 0) if ((displayDevice.StateFlags & DISPLAY_DEVICE_ATTACHED_TO_DESKTOP) != 0)
@ -393,7 +393,7 @@ OnInitDialog(IN HWND hwndDlg)
} }
/* Initialize the color spectrum bitmaps */ /* Initialize the color spectrum bitmaps */
for(i = 0; i < NUM_SPECTRUM_BITMAPS; i++) for (i = 0; i < NUM_SPECTRUM_BITMAPS; i++)
{ {
pData->hSpectrumBitmaps[i] = LoadImageW(hApplet, MAKEINTRESOURCEW(IDB_SPECTRUM_4 + i), IMAGE_BITMAP, 0, 0, LR_DEFAULTCOLOR); pData->hSpectrumBitmaps[i] = LoadImageW(hApplet, MAKEINTRESOURCEW(IDB_SPECTRUM_4 + i), IMAGE_BITMAP, 0, 0, LR_DEFAULTCOLOR);
@ -724,8 +724,8 @@ SettingsPageProc(IN HWND hwndDlg, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lPar
/* Apply new settings */ /* Apply new settings */
LONG rc; LONG rc;
DEVMODE devmode; DEVMODE devmode;
RtlZeroMemory(&devmode, sizeof(DEVMODE)); RtlZeroMemory(&devmode, sizeof(devmode));
devmode.dmSize = (WORD)sizeof(DEVMODE); devmode.dmSize = (WORD)sizeof(devmode);
devmode.dmPelsWidth = pData->CurrentDisplayDevice->CurrentSettings->dmPelsWidth; devmode.dmPelsWidth = pData->CurrentDisplayDevice->CurrentSettings->dmPelsWidth;
devmode.dmPelsHeight = pData->CurrentDisplayDevice->CurrentSettings->dmPelsHeight; devmode.dmPelsHeight = pData->CurrentDisplayDevice->CurrentSettings->dmPelsHeight;
devmode.dmBitsPerPel = pData->CurrentDisplayDevice->CurrentSettings->dmBitsPerPel; devmode.dmBitsPerPel = pData->CurrentDisplayDevice->CurrentSettings->dmBitsPerPel;

View file

@ -2,7 +2,7 @@
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS Display Control Panel * PROJECT: ReactOS Display Control Panel
* FILE: dll/cpl/desk/theme.c * FILE: dll/cpl/desk/theme.c
* PURPOSE: Handling themes * PURPOSE: Handling themes and visual effects
* *
* PROGRAMMERS: Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com> * PROGRAMMERS: Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
*/ */
@ -154,7 +154,7 @@ LoadCurrentScheme(OUT COLOR_SCHEME *scheme)
if (!ret) return FALSE; if (!ret) return FALSE;
/* Effects */ /* Effects */
/* "Use the following transition effect for menus and tooltips" */ /* Use the following transition effect for menus and tooltips */
ret = SystemParametersInfoW(SPI_GETMENUANIMATION, ret = SystemParametersInfoW(SPI_GETMENUANIMATION,
0, 0,
&scheme->Effects.bMenuAnimation, &scheme->Effects.bMenuAnimation,
@ -180,7 +180,7 @@ LoadCurrentScheme(OUT COLOR_SCHEME *scheme)
0); 0);
if (!ret) return FALSE; if (!ret) return FALSE;
/* "Hide underlined letters for keyboard navigation until I press the Alt key" */ /* Hide underlined letters for keyboard navigation until I press the Alt key */
ret = SystemParametersInfoW(SPI_GETKEYBOARDCUES, ret = SystemParametersInfoW(SPI_GETKEYBOARDCUES,
0, 0,
&scheme->Effects.bKeyboardCues, &scheme->Effects.bKeyboardCues,
@ -286,7 +286,7 @@ LoadSchemeFromReg(OUT COLOR_SCHEME *scheme, IN PTHEME_SELECTION pSelectedTheme)
} }
/* /*
ApplyScheme: Applies the selected scheme and stores its id in the registry if needed * ApplyScheme: Applies the selected scheme and stores its id in the registry if needed
*/ */
VOID VOID
ApplyScheme(IN COLOR_SCHEME *scheme, IN PTHEME_SELECTION pSelectedTheme) ApplyScheme(IN COLOR_SCHEME *scheme, IN PTHEME_SELECTION pSelectedTheme)
@ -549,8 +549,8 @@ LoadSchemeSizes(IN HKEY hkScheme)
} }
/* /*
LoadClassicColorSchemes: Returns a list of classic theme colours from the registry key of a scheme * LoadClassicColorSchemes: Returns a list of classic theme colours from the registry key of a scheme
*/ */
static THEME_STYLE* static THEME_STYLE*
LoadClassicColorSchemes(VOID) LoadClassicColorSchemes(VOID)
{ {
@ -664,9 +664,9 @@ EnumThemeProc(IN LPVOID lpReserved,
} }
/* /*
LoadThemes: Returns a list that contains tha classic theme and * LoadThemes: Returns a list that contains tha classic theme and
the visual styles of the system * the visual styles of the system
*/ */
PTHEME PTHEME
LoadThemes() LoadThemes()
{ {
@ -706,8 +706,8 @@ LoadThemes()
} }
/* /*
* GetActiveTheme: Gets the active theme and populates pSelectedTheme * GetActiveTheme: Gets the active theme and populates pSelectedTheme
* with entries from the list of loaded themes * with entries from the list of loaded themes
*/ */
BOOL BOOL
GetActiveTheme(IN PTHEME pThemeList, OUT PTHEME_SELECTION pSelectedTheme) GetActiveTheme(IN PTHEME pThemeList, OUT PTHEME_SELECTION pSelectedTheme)
@ -731,7 +731,7 @@ GetActiveTheme(IN PTHEME pThemeList, OUT PTHEME_SELECTION pSelectedTheme)
for (pTheme = pThemeList; pTheme; pTheme = pTheme->NextTheme) for (pTheme = pThemeList; pTheme; pTheme = pTheme->NextTheme)
{ {
if(pTheme->ThemeFileName && if (pTheme->ThemeFileName &&
_wcsicmp(pTheme->ThemeFileName, szThemeFileName) == 0) _wcsicmp(pTheme->ThemeFileName, szThemeFileName) == 0)
{ {
break; break;
@ -749,9 +749,9 @@ GetActiveTheme(IN PTHEME pThemeList, OUT PTHEME_SELECTION pSelectedTheme)
} }
/* /*
GetActiveTheme: Gets the active classic theme and populates pSelectedTheme * GetActiveTheme: Gets the active classic theme and populates pSelectedTheme
with entries from the list of loaded themes * with entries from the list of loaded themes
*/ */
BOOL BOOL
GetActiveClassicTheme(IN PTHEME pThemeList, OUT PTHEME_SELECTION pSelectedTheme) GetActiveClassicTheme(IN PTHEME pThemeList, OUT PTHEME_SELECTION pSelectedTheme)
{ {