diff --git a/src/ui.c b/src/ui.c index 4fe9003d..32fc07b8 100644 --- a/src/ui.c +++ b/src/ui.c @@ -149,7 +149,7 @@ void GetMainButtonsWidth(HWND hDlg) { unsigned int i; RECT rc; - LONG style; + LONG_PTR style; char download[64]; GetWindowRect(GetDlgItem(hDlg, main_button_ids[0]), &rc); @@ -167,9 +167,9 @@ void GetMainButtonsWidth(HWND hDlg) static_strcpy(download, lmprintf(MSG_040)); CharUpperBuffU(download, sizeof(download)); bw = max(bw, GetTextSize(GetDlgItem(hDlg, IDC_SELECT), download).cx + (3 * cbw) / 2); - style = GetWindowLong(GetDlgItem(hDlg, IDC_SELECT), GWL_STYLE); - style|= BS_SPLITBUTTON; - SetWindowLong(GetDlgItem(hDlg, IDC_SELECT), GWL_STYLE, style); + style = GetWindowLongPtr(GetDlgItem(hDlg, IDC_SELECT), GWL_STYLE); + style |= BS_SPLITBUTTON; + SetWindowLongPtr(GetDlgItem(hDlg, IDC_SELECT), GWL_STYLE, style); } }