summaryrefslogtreecommitdiff
path: root/src/core/stdchat
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/stdchat')
-rw-r--r--src/core/stdchat/src/chat.h5
-rw-r--r--src/core/stdchat/src/main.cpp8
2 files changed, 11 insertions, 2 deletions
diff --git a/src/core/stdchat/src/chat.h b/src/core/stdchat/src/chat.h
index cf157efb7d..83421a44d5 100644
--- a/src/core/stdchat/src/chat.h
+++ b/src/core/stdchat/src/chat.h
@@ -96,8 +96,9 @@ struct LOGSTREAMDATA : public GCLogStreamDataBase {};
struct GlobalLogSettings : public GlobalLogSettingsBase
{
- int iX, iY;
- bool bTabsEnable, TabsAtBottom, TabCloseOnDblClick, TabRestore;
+ int iX, iY;
+ bool bTabsEnable, TabsAtBottom, TabCloseOnDblClick, TabRestore;
+ HFONT MessageBoxFont;
};
extern GlobalLogSettings g_Settings;
diff --git a/src/core/stdchat/src/main.cpp b/src/core/stdchat/src/main.cpp
index 63688d51cf..61be5168ad 100644
--- a/src/core/stdchat/src/main.cpp
+++ b/src/core/stdchat/src/main.cpp
@@ -256,6 +256,12 @@ static BOOL DoPopup(SESSION_INFO *si, GCEVENT *gce)
static void OnLoadSettings()
{
+ LOGFONT lf;
+ if (g_Settings.MessageBoxFont)
+ DeleteObject(g_Settings.MessageBoxFont);
+ pci->LoadMsgDlgFont(17, &lf, NULL);
+ g_Settings.MessageBoxFont = CreateFontIndirect(&lf);
+
g_Settings.iX = db_get_dw(NULL, CHAT_MODULE, "roomx", -1);
g_Settings.iY = db_get_dw(NULL, CHAT_MODULE, "roomy", -1);
@@ -366,6 +372,8 @@ extern "C" __declspec(dllexport) int Unload(void)
db_set_dw(NULL, CHAT_MODULE, "roomwidth" , g_Settings.iWidth);
db_set_dw(NULL, CHAT_MODULE, "roomheight", g_Settings.iHeight);
+ if (g_Settings.MessageBoxFont)
+ DeleteObject(g_Settings.MessageBoxFont);
DestroyMenu(g_hMenu);
return 0;
}