Created
December 19, 2013 08:15
-
-
Save neokril/8035995 to your computer and use it in GitHub Desktop.
Little application for enabling Windows option "Show window contents while dragging". This app can be used as a fix for Citrix client incorrect behavior - it switches off this option from time to time. I tried this solution: http://aaronwalrath.wordpress.com/2010/12/05/fix-for-citrix-xenapp-published-apps-disabling-windows-visual-effects/ but it…
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
#include <tchar.h> | |
#include <cstdio> | |
#pragma comment(lib, "user32.lib") | |
int _tmain(int argc, _TCHAR* argv[]) | |
{ | |
BOOL enabled; | |
SystemParametersInfo(SPI_GETDRAGFULLWINDOWS, | |
NULL, &enabled, 0); | |
printf("Current 'dragfullwindow' option status: %d\n", enabled); | |
if (!enabled) | |
{ | |
SystemParametersInfo(SPI_SETDRAGFULLWINDOWS, | |
TRUE, | |
NULL, | |
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE); | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I actually wrote a .NET systray version of this to try and detect when the "show window contents while dragging" is changed and change it back. Unfortunately, while it's possible to detect when the setting is changed via the Windows UI, the Citrix client manages to change it completely silently, so the only way for it to work is to simply toggle the setting on some schedule... and scheduling a repeated task is exactly what the task scheduler is designed for, so there's not much reason to re-implement this while requiring the program to be open all the time.