diff options
author | George Hazan <george.hazan@gmail.com> | 2016-10-03 16:48:12 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-10-03 16:48:12 +0000 |
commit | 0976190894d653d5062f8ef6befabf46218f2d24 (patch) | |
tree | 4a26f4baa9a535256d7220a0c04a698390cab4e5 /plugins/Alarms | |
parent | 3c4ccf82586be6b22380df2bc35ae4770f91651f (diff) |
- 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
Diffstat (limited to 'plugins/Alarms')
-rw-r--r-- | plugins/Alarms/src/alarm_win.cpp | 12 | ||||
-rw-r--r-- | plugins/Alarms/src/frame.cpp | 16 |
2 files changed, 14 insertions, 14 deletions
diff --git a/plugins/Alarms/src/alarm_win.cpp b/plugins/Alarms/src/alarm_win.cpp index 5dfe6730cb..451075796e 100644 --- a/plugins/Alarms/src/alarm_win.cpp +++ b/plugins/Alarms/src/alarm_win.cpp @@ -331,15 +331,15 @@ INT_PTR CALLBACK DlgProcAlarm(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar int ReloadFonts(WPARAM, LPARAM)
{
LOGFONT log_font;
- title_font_colour = CallService(MS_FONT_GETW, (WPARAM)&title_font_id, (LPARAM)&log_font);
+ title_font_colour = Font_GetW(title_font_id, &log_font);
DeleteObject(hTitleFont);
hTitleFont = CreateFontIndirect(&log_font);
- window_font_colour = CallService(MS_FONT_GETW, (WPARAM)&window_font_id, (LPARAM)&log_font);
+ window_font_colour = Font_GetW(window_font_id, &log_font);
DeleteObject(hWindowFont);
hWindowFont = CreateFontIndirect(&log_font);
- COLORREF bkCol = CallService(MS_COLOUR_GETW, (WPARAM)&bk_colour_id, 0);
+ COLORREF bkCol = Colour_GetW(bk_colour_id);
DeleteObject(hBackgroundBrush);
hBackgroundBrush = CreateSolidBrush(bkCol);
@@ -358,7 +358,7 @@ int AlarmWinModulesLoaded(WPARAM, LPARAM) mir_wstrcpy(title_font_id.backgroundName, LPGENW("Background"));
title_font_id.flags = 0;
title_font_id.order = 0;
- FontRegisterW(&title_font_id);
+ Font_RegisterW(&title_font_id);
window_font_id.cbSize = sizeof(FontIDW);
mir_wstrcpy(window_font_id.group, LPGENW("Alarms"));
@@ -369,7 +369,7 @@ int AlarmWinModulesLoaded(WPARAM, LPARAM) mir_wstrcpy(window_font_id.backgroundName, LPGENW("Background"));
window_font_id.flags = 0;
window_font_id.order = 1;
- FontRegisterW(&window_font_id);
+ Font_RegisterW(&window_font_id);
bk_colour_id.cbSize = sizeof(ColourIDW);
mir_strcpy(bk_colour_id.dbSettingsGroup, MODULE);
@@ -380,7 +380,7 @@ int AlarmWinModulesLoaded(WPARAM, LPARAM) bk_colour_id.flags = 0;
bk_colour_id.order = 0;
- ColourRegisterW(&bk_colour_id);
+ Colour_RegisterW(&bk_colour_id);
ReloadFonts(0, 0);
HookEvent(ME_FONT_RELOAD, ReloadFonts);
diff --git a/plugins/Alarms/src/frame.cpp b/plugins/Alarms/src/frame.cpp index da831a8fb6..41824701af 100644 --- a/plugins/Alarms/src/frame.cpp +++ b/plugins/Alarms/src/frame.cpp @@ -433,9 +433,9 @@ int ReloadFont(WPARAM, LPARAM) {
DeleteObject(hFont);
- LOGFONT log_font;
- fontColour = CallService(MS_FONT_GET, (WPARAM)&font_id, (LPARAM)&log_font);
- hFont = CreateFontIndirect(&log_font);
+ LOGFONTA log_font;
+ fontColour = Font_Get(font_id, &log_font);
+ hFont = CreateFontIndirectA(&log_font);
SendMessage(hwnd_list, WM_SETFONT, (WPARAM)hFont, TRUE);
DeleteObject(bk_brush);
@@ -568,7 +568,7 @@ int CreateFrame() strncpy(font_id.dbSettingsGroup, MODULE, sizeof(font_id.dbSettingsGroup));
strncpy(font_id.prefix, "Font", sizeof(font_id.prefix));
font_id.order = 0;
- FontRegister(&font_id);
+ Font_Register(&font_id);
framebk_colour_id.cbSize = sizeof(ColourID);
mir_strcpy(framebk_colour_id.dbSettingsGroup, MODULE);
@@ -578,11 +578,11 @@ int CreateFrame() framebk_colour_id.defcolour = GetSysColor(COLOR_3DFACE);
framebk_colour_id.flags = 0;
framebk_colour_id.order = 0;
- ColourRegister(&framebk_colour_id);
+ Colour_Register(&framebk_colour_id);
- LOGFONT log_font;
- fontColour = CallService(MS_FONT_GET, (WPARAM)&font_id, (LPARAM)&log_font);
- hFont = CreateFontIndirect(&log_font);
+ LOGFONTA log_font;
+ fontColour = Font_Get(font_id, &log_font);
+ hFont = CreateFontIndirectA(&log_font);
SendMessage(hwnd_list, WM_SETFONT, (WPARAM)hFont, TRUE);
HookEvent(ME_FONT_RELOAD, ReloadFont);
|