From 4e127b7922b7d4c0662aa11e0cfa90842a9226b0 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Thu, 19 Jun 2008 14:48:31 -0700 Subject: [PATCH] comctl32: Use ms sans serif in ip controls. --- dlls/comctl32/ipaddress.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/dlls/comctl32/ipaddress.c b/dlls/comctl32/ipaddress.c index a9e980b..ce5808e 100644 --- a/dlls/comctl32/ipaddress.c +++ b/dlls/comctl32/ipaddress.c @@ -167,9 +167,12 @@ static LRESULT IPADDRESS_Draw (const IPADDRESS_INFO *infoPtr, HDC hdc) static LRESULT IPADDRESS_Create (HWND hwnd, const CREATESTRUCTA *lpCreate) { static const WCHAR EDIT[] = { 'E', 'd', 'i', 't', 0 }; + static const WCHAR MSSanSerif[] = { 'M','S',' ','S','a','n','s',' ','S','e','r','i','f','\0' }; IPADDRESS_INFO *infoPtr; RECT rcClient, edit; int i, fieldsize; + HFONT hFont; + LOGFONTW logFont; TRACE("\n"); @@ -191,6 +194,10 @@ static LRESULT IPADDRESS_Create (HWND hwnd, const CREATESTRUCTA *lpCreate) infoPtr->Enabled = TRUE; infoPtr->Notify = lpCreate->hwndParent; + SystemParametersInfoW(SPI_GETICONTITLELOGFONT, 0, &logFont, 0); + strcpyW(logFont.lfFaceName, MSSanSerif); + hFont = CreateFontIndirectW(&logFont); + for (i = 0; i < 4; i++) { IPPART_INFO* part = &infoPtr->Part[i]; @@ -203,6 +210,7 @@ static LRESULT IPADDRESS_Create (HWND hwnd, const CREATESTRUCTA *lpCreate) edit.left, edit.top, edit.right - edit.left, edit.bottom - edit.top, hwnd, (HMENU) 1, (HINSTANCE)GetWindowLongPtrW(hwnd, GWLP_HINSTANCE), NULL); + SendMessageW(part->EditHwnd, WM_SETFONT, (WPARAM) hFont, FALSE); SetPropW(part->EditHwnd, IP_SUBCLASS_PROP, hwnd); part->OrigProc = (WNDPROC) SetWindowLongPtrW (part->EditHwnd, GWLP_WNDPROC, -- 1.5.3.6