VOID PhInitializeFont( _In_ HWND hWnd ) { NONCLIENTMETRICS metrics = { sizeof(metrics) }; BOOLEAN success; HDC hdc; if (hdc = GetDC(hWnd)) { PhGlobalDpi = GetDeviceCaps(hdc, LOGPIXELSY); ReleaseDC(hWnd, hdc); } else { PhGlobalDpi = 96; } success = !!SystemParametersInfo(SPI_GETNONCLIENTMETRICS, 0, &metrics, 0); if ( !(PhApplicationFont = PhpCreateFont(L"Microsoft Sans Serif", 8, FW_NORMAL)) && !(PhApplicationFont = PhpCreateFont(L"Tahoma", 8, FW_NORMAL)) ) { if (success) PhApplicationFont = CreateFontIndirect(&metrics.lfMessageFont); else PhApplicationFont = NULL; } }
VOID PhInitializeFont( _In_ HWND hWnd ) { NONCLIENTMETRICS metrics = { sizeof(metrics) }; BOOLEAN success; success = !!SystemParametersInfo(SPI_GETNONCLIENTMETRICS, 0, &metrics, 0); if ( !(PhApplicationFont = PhpCreateFont(hWnd, L"Microsoft Sans Serif", 8, FW_NORMAL)) && !(PhApplicationFont = PhpCreateFont(hWnd, L"Tahoma", 8, FW_NORMAL)) ) { if (success) PhApplicationFont = CreateFontIndirect(&metrics.lfMessageFont); else PhApplicationFont = NULL; } }