[misc] use GetWindowLongPtr/SetWindowLongPtr everywhere

* Also remove WS_EX_RIGHT style from IDC_PERSISTENCE_SIZE since we apply it manually
This commit is contained in:
Pete Batard 2018-08-20 09:46:23 +01:00
parent efcdbe30e5
commit 619dd9862b
4 changed files with 22 additions and 20 deletions

View file

@ -643,16 +643,17 @@ void TogglePersistenceControls(BOOL display)
{
RECT rc;
HWND hSize, hUnits;
LONG style, width = fw - bsw - ssw;
LONG_PTR style;
LONG width = fw - bsw - ssw;
hSize = GetDlgItem(hMainDialog, IDC_PERSISTENCE_SIZE);
hUnits = GetDlgItem(hMainDialog, IDC_PERSISTENCE_UNITS);
style = GetWindowLong(hSize, GWL_EXSTYLE);
style = GetWindowLongPtr(hSize, GWL_EXSTYLE);
if (display)
style |= WS_EX_RIGHT;
else
style &= ~WS_EX_RIGHT;
SetWindowLong(hSize, GWL_EXSTYLE, style);
SetWindowLongPtr(hSize, GWL_EXSTYLE, style);
if (display) {
GetWindowRect(hUnits, &rc);