"Anatoly Lyutin" vostok@etersoft.ru wrote:
struct dialog_info* di; unsigned idc;
unsigned nMaxHistUD = 500;
switch (msg) {
@@ -66,6 +67,8 @@ static INT_PTR WINAPI WCUSER_OptionDlgPr di = (struct dialog_info*)((PROPSHEETPAGEA*)lParam)->lParam; di->hDlg = hDlg; SetWindowLongPtr(hDlg, DWLP_USER, (LONG_PTR)di);
- SendMessage(GetDlgItem(hDlg,IDC_OPT_HIST_SIZE_UD), UDM_SETRANGE, (WPARAM) 0, MAKELONG (nMaxHistUD, 0));
There is no need for (WPARAM) cast. Better use MAKELPARAM to construct an lParam instead of MAKELONG. Simple MAKELPARAM(500, 0) works just fine without introducing a new variable.