[RESEND] Unicodified fontdlg (next try)

Alexandre Julliard julliard at winehq.org
Wed Dec 8 09:11:41 CST 2004


Jacek Caban <jack at itma.pwr.wroc.pl> writes:

> -INT_PTR CALLBACK FormatCharDlgProcA(HWND hDlg, UINT uMsg, WPARAM wParam,
> +INT_PTR CALLBACK FormatCharDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam,
>          LPARAM lParam)
>  {
> -    LPCHOOSEFONTA lpcf;
> +    LPCHOOSEFONTW lpcf;
>      INT_PTR res = FALSE;
>  
>      if (uMsg!=WM_INITDIALOG)
>      {
> -        lpcf=(LPCHOOSEFONTA)GetPropA(hDlg, WINE_FONTDATA);
> -        if (!lpcf && uMsg != WM_MEASUREITEM)
> +        lpcf=(LPCHOOSEFONTW)GetPropW(hDlg, strWineFontData);
> +        if (!lpcf)
>              return FALSE;
>          if (CFn_HookCallChk32(lpcf))
> -            res=CallWindowProcA((WNDPROC)lpcf->lpfnHook, hDlg, uMsg, wParam, lParam);
> +            res=CallWindowProcW((WNDPROC)lpcf->lpfnHook, hDlg, uMsg, wParam, lParam);

You cannot use the same dialog procedure for A and W here, since it
will cause the hook to always be called with a W message, even if the
app originally called ChooseFontA. You really need to keep both dialog
procedures.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list