Module: wine Branch: master Commit: fdf8ab11d9a2886d5a5e8c04f71c9619dceecfef URL: http://source.winehq.org/git/wine.git/?a=commit;h=fdf8ab11d9a2886d5a5e8c04f7...
Author: Hans Leidekker hans@codeweavers.com Date: Fri Jul 26 17:20:39 2013 +0200
msi: Format text set by means of a control event.
---
dlls/msi/dialog.c | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/dlls/msi/dialog.c b/dlls/msi/dialog.c index 1e02467..5a7cbe7 100644 --- a/dlls/msi/dialog.c +++ b/dlls/msi/dialog.c @@ -621,19 +621,25 @@ static void dialog_handle_event( msi_dialog *dialog, const WCHAR *control, const WCHAR *attribute, MSIRECORD *rec ) { msi_control* ctrl; - LPCWSTR font_text, text = NULL; - LPWSTR font;
ctrl = msi_dialog_find_control( dialog, control ); if (!ctrl) return; if( !strcmpW( attribute, szText ) ) { + const WCHAR *font_text, *text = NULL; + WCHAR *font, *text_fmt = NULL; + font_text = MSI_RecordGetString( rec , 1 ); font = msi_dialog_get_style( font_text, &text ); - if (!text) text = szEmpty; + deformat_string( dialog->package, text, &text_fmt ); + if (text_fmt) text = text_fmt; + else text = szEmpty; + SetWindowTextW( ctrl->hwnd, text ); + msi_free( font ); + msi_free( text_fmt ); msi_dialog_check_messages( NULL ); } else if( !strcmpW( attribute, szProgress ) )