Home | Info | Community | Development | myReactOS | Contact Us
[static]
Definition at line 15 of file lrgcell.c.
Referenced by LrgCellWndProc().
{ LOGFONTW lf; HFONT hFont = NULL; HDC hdc; HWND hCombo; LPWSTR lpFontName; INT Len; hCombo = GetDlgItem(infoPtr->hParent, IDC_FONTCOMBO); Len = GetWindowTextLengthW(hCombo); if (Len != 0) { lpFontName = HeapAlloc(GetProcessHeap(), 0, (Len + 1) * sizeof(WCHAR)); if (lpFontName) { SendMessageW(hCombo, WM_GETTEXT, 31, (LPARAM)lpFontName); ZeroMemory(&lf, sizeof(lf)); hdc = GetDC(infoPtr->hLrgWnd); lf.lfHeight = GetDeviceCaps(hdc, LOGPIXELSY) / 2; ReleaseDC(infoPtr->hLrgWnd, hdc); lf.lfCharSet = DEFAULT_CHARSET; wcscpy(lf.lfFaceName, lpFontName); hFont = CreateFontIndirectW(&lf); HeapFree(GetProcessHeap(), 0, lpFontName); } } return hFont; }