From ed1449fa491e90197b78b64b52c70910f1736dd7 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 25 Jun 2012 15:05:30 +0000 Subject: dynamic fonts' options translation git-svn-id: http://svn.miranda-ng.org/main/trunk@633 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Weather/weather_mwin.cpp | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'protocols/Weather') diff --git a/protocols/Weather/weather_mwin.cpp b/protocols/Weather/weather_mwin.cpp index 4c43cc2afe..4e4fd125bd 100644 --- a/protocols/Weather/weather_mwin.cpp +++ b/protocols/Weather/weather_mwin.cpp @@ -373,19 +373,16 @@ void InitMwin(void) } { - FontID fontid = {0}; ColourID colourid = {0}; - HDC hdc; - colourid.cbSize = sizeof(ColourID); strcpy(colourid.dbSettingsGroup, WEATHERPROTONAME); strcpy(colourid.setting, "ColorMwinFrame"); strcpy(colourid.name, "Frame Background"); strcpy(colourid.group, WEATHERPROTONAME); colourid.defcolour = GetSysColor(COLOR_3DFACE); + ColourRegister(&colourid); - CallService(MS_COLOUR_REGISTER, (WPARAM)&colourid, 0); - + FontID fontid = {0}; fontid.cbSize = sizeof(FontID); fontid.flags = FIDF_ALLOWREREGISTER | FIDF_DEFAULTVALID; strcpy(fontid.dbSettingsGroup, WEATHERPROTONAME); @@ -393,7 +390,7 @@ void InitMwin(void) strcpy(fontid.name, "Frame Font"); strcpy(fontid.prefix, "fnt0"); - hdc = GetDC(NULL); + HDC hdc = GetDC(NULL); fontid.deffontsettings.size = -13; ReleaseDC(0, hdc); @@ -401,14 +398,12 @@ void InitMwin(void) strcpy(fontid.deffontsettings.szFace, "Verdana"); strcpy(fontid.backgroundGroup, WEATHERPROTONAME); strcpy(fontid.backgroundName, "Frame Background"); - - CallService(MS_FONT_REGISTER, (WPARAM)&fontid, 0); + FontRegister(&fontid); fontid.deffontsettings.style = DBFONTF_BOLD; strcpy(fontid.name, "Frame Title Font"); strcpy(fontid.prefix, "fnt1"); - - CallService(MS_FONT_REGISTER, (WPARAM)&fontid, 0); + FontRegister(&fontid); } hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0); -- cgit v1.2.3