Hi Jacek, On Wed, 2 Mar 2022 at 03:15, Jacek Caban wrote:
On 3/1/22 12:37, Hugh McMaster wrote:
case PSN_APPLY: - val = SendDlgItemMessageW( dialog, IDC_FNT_LIST_SIZE, LB_GETCURSEL, 0, 0 ); - if (val < di->font_count) - { - LOGFONTW lf; - - fill_logfont( &lf, di->font[val].faceName, - wcslen(di->font[val].faceName) * sizeof(WCHAR), - di->font[val].height, di->font[val].weight ); - DeleteObject( select_font_config( &di->config, di->console->output_cp, - di->console->win, &lf )); - } - + DeleteObject( di->hfont );
font_preview_proc already deletes current font in its WM_DESTROY, isn't that enough to clean up the font?
Yes, it is - we don't want two calls to DeleteObject (not harmful, just not needed). Sorry for totally missing the WM_DESTROY case.