"David Lowndes" <dav...@example.invalid> wrote in message
news:nqvu80lpoec9hio57...@4ax.com...
I can't reproduce a problem on XP. I've created a dialog box with an
edit control and list box and used this code:
case WM_INITDIALOG:
SendDlgItemMessage( hDlg, IDC_LIST1, LB_ADDSTRING, 0, (LPARAM)
_T( "Item 1 " ));
SendDlgItemMessage( hDlg, IDC_LIST1, LB_ADDSTRING, 0, (LPARAM)
_T( "Item 2 " ) );
{
HFONT hFnt = (HFONT) SendDlgItemMessage( hDlg,
IDC_EDIT1, WM_GETFONT, 0, 0 );
LOGFONT lf;
GetObject( hFnt, sizeof( lf ), &lf );
lf.lfItalic = true;
HFONT hf = CreateFontIndirect( &lf );
SendDlgItemMessage( hDlg, IDC_EDIT1, WM_SETFONT,
(WPARAM) hf, 1 );
SendDlgItemMessage( hDlg, IDC_LIST1, WM_SETFONT, (WPARAM) hf,
1 );
}
return TRUE;
I've tried MBCS and Unicode builds with an without XP themes and it
works OK for me.
What's different in your situation?