From 0976190894d653d5062f8ef6befabf46218f2d24 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 3 Oct 2016 16:48:12 +0000 Subject: - inlined helpers for fonts, colors & effects creation replaced with functions; - services for getting fonts, colors & effects removed; - some memory corruptions removed git-svn-id: http://svn.miranda-ng.org/main/trunk@17347 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Weather/src/weather_mwin.cpp | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) (limited to 'plugins/Weather/src') diff --git a/plugins/Weather/src/weather_mwin.cpp b/plugins/Weather/src/weather_mwin.cpp index d51d9e6606..14266b6a4f 100644 --- a/plugins/Weather/src/weather_mwin.cpp +++ b/plugins/Weather/src/weather_mwin.cpp @@ -155,16 +155,8 @@ static LRESULT CALLBACK wndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara } clr = db_get_dw(NULL, WEATHERPROTONAME, "ColorMwinFrame", GetSysColor(COLOR_3DFACE)); - - { - FontIDW fntid = { 0 }; - mir_wstrcpy(fntid.group, _A2W(WEATHERPROTONAME)); - mir_wstrcpy(fntid.name, LPGENW("Frame Font")); - fntc = CallService(MS_FONT_GETW, (WPARAM)&fntid, (LPARAM)&lfnt); - - mir_wstrcpy(fntid.name, LPGENW("Frame Title Font")); - fntc1 = CallService(MS_FONT_GETW, (WPARAM)&fntid, (LPARAM)&lfnt1); - } + fntc = Font_GetW(_A2W(WEATHERPROTONAME), LPGENW("Frame Font"), &lfnt); + fntc1 = Font_GetW(_A2W(WEATHERPROTONAME), LPGENW("Frame Title Font"), &lfnt1); ptrW tszInfo(db_get_wsa(data->hContact, WEATHERCONDITION, "WeatherInfo")); @@ -331,7 +323,7 @@ void InitMwin(void) mir_wstrcpy(colourid.name, LPGENW("Frame Background")); mir_wstrcpy(colourid.group, _A2W(WEATHERPROTONAME)); colourid.defcolour = GetSysColor(COLOR_3DFACE); - ColourRegisterW(&colourid); + Colour_RegisterW(&colourid); FontIDW fontid = { 0 }; fontid.cbSize = sizeof(FontIDW); @@ -349,12 +341,12 @@ void InitMwin(void) mir_wstrcpy(fontid.deffontsettings.szFace, L"Verdana"); mir_wstrcpy(fontid.backgroundGroup, _A2W(WEATHERPROTONAME)); mir_wstrcpy(fontid.backgroundName, LPGENW("Frame Background")); - FontRegisterW(&fontid); + Font_RegisterW(&fontid); fontid.deffontsettings.style = DBFONTF_BOLD; mir_wstrcpy(fontid.name, LPGENW("Frame Title Font")); mir_strcpy(fontid.prefix, "fnt1"); - FontRegisterW(&fontid); + Font_RegisterW(&fontid); for (MCONTACT hContact = db_find_first(WEATHERPROTONAME); hContact; hContact = db_find_next(hContact, WEATHERPROTONAME)) if (db_get_dw(hContact, WEATHERPROTONAME, "mwin", 0)) -- cgit v1.2.3