winecfg: Add dll override on return key press in combobox [resend]

Dmitry Timoshkov dmitry at codeweavers.com
Fri Dec 26 22:30:54 CST 2008


"Andre Wisplinghoff" <andre.wisplinghoff at gmail.com> wrote:

> +INT_PTR CALLBACK
> +comboedit_wndproc (HWND hEdit, UINT uMsg, WPARAM wParam, LPARAM lParam)

INT_PTR is wrong return value type for a window proc.

> +    /* subclass dllcombo's edit to allow return keypress handling  */
> +    GetComboBoxInfo(GetDlgItem(dialog, IDC_DLLCOMBO), &cbinfo);
> +    edit = cbinfo.hwndItem;  /* retrieve edit box handle */
> +    oldWndProc = (LONG_PTR)SetWindowLong(edit, GWL_WNDPROC,
> +                          (DWORD) comboedit_wndproc);
> +    SetWindowLong(edit, GWL_USERDATA, (DWORD)oldWndProc);

The code is above is not 64-bit safe.


-- 
Dmitry.



More information about the wine-devel mailing list