Lei Zhang : comctl32: Use the system variable pitch font for ip address controls.
Alexandre Julliard
julliard at winehq.org
Thu Jun 26 06:48:33 CDT 2008
Module: wine
Branch: master
Commit: 011bad8ddf0322e6909a166a505225cf62459d7c
URL: http://source.winehq.org/git/wine.git/?a=commit;h=011bad8ddf0322e6909a166a505225cf62459d7c
Author: Lei Zhang <thestig at google.com>
Date: Mon Jun 23 13:34:16 2008 -0700
comctl32: Use the system variable pitch font for ip address controls.
---
dlls/comctl32/ipaddress.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/dlls/comctl32/ipaddress.c b/dlls/comctl32/ipaddress.c
index a9e980b..c29406f 100644
--- a/dlls/comctl32/ipaddress.c
+++ b/dlls/comctl32/ipaddress.c
@@ -170,6 +170,8 @@ static LRESULT IPADDRESS_Create (HWND hwnd, const CREATESTRUCTA *lpCreate)
IPADDRESS_INFO *infoPtr;
RECT rcClient, edit;
int i, fieldsize;
+ HFONT hFont, hSysFont;
+ LOGFONTW logFont, logSysFont;
TRACE("\n");
@@ -191,6 +193,12 @@ static LRESULT IPADDRESS_Create (HWND hwnd, const CREATESTRUCTA *lpCreate)
infoPtr->Enabled = TRUE;
infoPtr->Notify = lpCreate->hwndParent;
+ hSysFont = (HFONT) GetStockObject(ANSI_VAR_FONT);
+ GetObjectW(hSysFont, sizeof(LOGFONTW), &logSysFont);
+ SystemParametersInfoW(SPI_GETICONTITLELOGFONT, 0, &logFont, 0);
+ strcpyW(logFont.lfFaceName, logSysFont.lfFaceName);
+ hFont = CreateFontIndirectW(&logFont);
+
for (i = 0; i < 4; i++) {
IPPART_INFO* part = &infoPtr->Part[i];
@@ -203,6 +211,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,
More information about the wine-cvs
mailing list