aboutsummaryrefslogtreecommitdiffstats
path: root/win/rfb_win32/CleanDesktop.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'win/rfb_win32/CleanDesktop.cxx')
-rw-r--r--win/rfb_win32/CleanDesktop.cxx24
1 files changed, 12 insertions, 12 deletions
diff --git a/win/rfb_win32/CleanDesktop.cxx b/win/rfb_win32/CleanDesktop.cxx
index e69acd7f..d2d6d2d1 100644
--- a/win/rfb_win32/CleanDesktop.cxx
+++ b/win/rfb_win32/CleanDesktop.cxx
@@ -40,9 +40,9 @@ static LogWriter vlog("CleanDesktop");
struct ActiveDesktop {
- ActiveDesktop() : handle(0) {
+ ActiveDesktop() : handle(nullptr) {
// - Contact Active Desktop
- HRESULT result = CoCreateInstance(CLSID_ActiveDesktop, NULL, CLSCTX_INPROC_SERVER,
+ HRESULT result = CoCreateInstance(CLSID_ActiveDesktop, nullptr, CLSCTX_INPROC_SERVER,
IID_IActiveDesktop, (PVOID*)&handle);
if (result != S_OK)
throw rdr::SystemException("failed to contact Active Desktop", result);
@@ -153,7 +153,7 @@ DWORD SysParamsInfo(UINT action, UINT param, PVOID ptr, UINT ini) {
CleanDesktop::CleanDesktop() : restoreActiveDesktop(false),
restoreWallpaper(false),
restoreEffects(false) {
- CoInitialize(0);
+ CoInitialize(nullptr);
}
CleanDesktop::~CleanDesktop() {
@@ -207,7 +207,7 @@ void CleanDesktop::enableWallpaper() {
vlog.debug("restore desktop wallpaper");
// -=- Then restore the standard wallpaper if required
- SysParamsInfo(SPI_SETDESKWALLPAPER, 0, NULL, SPIF_SENDCHANGE);
+ SysParamsInfo(SPI_SETDESKWALLPAPER, 0, nullptr, SPIF_SENDCHANGE);
restoreWallpaper = false;
}
@@ -223,20 +223,20 @@ void CleanDesktop::disableEffects() {
vlog.debug("disable desktop effects");
- SysParamsInfo(SPI_SETFONTSMOOTHING, FALSE, 0, SPIF_SENDCHANGE);
+ SysParamsInfo(SPI_SETFONTSMOOTHING, FALSE, nullptr, SPIF_SENDCHANGE);
if (SysParamsInfo(SPI_GETUIEFFECTS, 0, &uiEffects, 0) == ERROR_CALL_NOT_IMPLEMENTED) {
SysParamsInfo(SPI_GETCOMBOBOXANIMATION, 0, &comboBoxAnim, 0);
SysParamsInfo(SPI_GETGRADIENTCAPTIONS, 0, &gradientCaptions, 0);
SysParamsInfo(SPI_GETHOTTRACKING, 0, &hotTracking, 0);
SysParamsInfo(SPI_GETLISTBOXSMOOTHSCROLLING, 0, &listBoxSmoothScroll, 0);
SysParamsInfo(SPI_GETMENUANIMATION, 0, &menuAnim, 0);
- SysParamsInfo(SPI_SETCOMBOBOXANIMATION, 0, FALSE, SPIF_SENDCHANGE);
- SysParamsInfo(SPI_SETGRADIENTCAPTIONS, 0, FALSE, SPIF_SENDCHANGE);
- SysParamsInfo(SPI_SETHOTTRACKING, 0, FALSE, SPIF_SENDCHANGE);
- SysParamsInfo(SPI_SETLISTBOXSMOOTHSCROLLING, 0, FALSE, SPIF_SENDCHANGE);
- SysParamsInfo(SPI_SETMENUANIMATION, 0, FALSE, SPIF_SENDCHANGE);
+ SysParamsInfo(SPI_SETCOMBOBOXANIMATION, 0, (PVOID)FALSE, SPIF_SENDCHANGE);
+ SysParamsInfo(SPI_SETGRADIENTCAPTIONS, 0, (PVOID)FALSE, SPIF_SENDCHANGE);
+ SysParamsInfo(SPI_SETHOTTRACKING, 0, (PVOID)FALSE, SPIF_SENDCHANGE);
+ SysParamsInfo(SPI_SETLISTBOXSMOOTHSCROLLING, 0, (PVOID)FALSE, SPIF_SENDCHANGE);
+ SysParamsInfo(SPI_SETMENUANIMATION, 0, (PVOID)FALSE, SPIF_SENDCHANGE);
} else {
- SysParamsInfo(SPI_SETUIEFFECTS, 0, FALSE, SPIF_SENDCHANGE);
+ SysParamsInfo(SPI_SETUIEFFECTS, 0, (PVOID)FALSE, SPIF_SENDCHANGE);
// We *always* restore UI effects overall, since there is no Windows GUI to do it
uiEffects = TRUE;
@@ -257,7 +257,7 @@ void CleanDesktop::enableEffects() {
RegKey desktopCfg;
desktopCfg.openKey(HKEY_CURRENT_USER, "Control Panel\\Desktop");
- SysParamsInfo(SPI_SETFONTSMOOTHING, desktopCfg.getInt("FontSmoothing", 0) != 0, 0, SPIF_SENDCHANGE);
+ SysParamsInfo(SPI_SETFONTSMOOTHING, desktopCfg.getInt("FontSmoothing", 0) != 0, nullptr, SPIF_SENDCHANGE);
if (SysParamsInfo(SPI_SETUIEFFECTS, 0, (void*)(intptr_t)uiEffects, SPIF_SENDCHANGE) == ERROR_CALL_NOT_IMPLEMENTED) {
SysParamsInfo(SPI_SETCOMBOBOXANIMATION, 0, (void*)(intptr_t)comboBoxAnim, SPIF_SENDCHANGE);
SysParamsInfo(SPI_SETGRADIENTCAPTIONS, 0, (void*)(intptr_t)gradientCaptions, SPIF_SENDCHANGE);