diff options
author | George Hazan <ghazan@miranda.im> | 2020-01-21 19:04:27 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-01-21 19:04:27 +0300 |
commit | 9aa5329a4b4077970571f40f79486a3a1bf3e9f8 (patch) | |
tree | ee4e08d2bdc519d6df1e9fdcf8751d0e4d67af95 /plugins/VoiceService/src/frame.cpp | |
parent | 1a2103e23c5b65c9a4e5eb6cc84b23f8395a0ebd (diff) |
compilation fix for 32 bit version
Diffstat (limited to 'plugins/VoiceService/src/frame.cpp')
-rw-r--r-- | plugins/VoiceService/src/frame.cpp | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/plugins/VoiceService/src/frame.cpp b/plugins/VoiceService/src/frame.cpp index a95f04f886..365a357e15 100644 --- a/plugins/VoiceService/src/frame.cpp +++ b/plugins/VoiceService/src/frame.cpp @@ -26,39 +26,10 @@ HWND hwnd_container = NULL; int frame_id = -1; -static LRESULT CALLBACK FrameWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); - #define H_SPACE 2 // Functions ////////////////////////////////////////////////////////////////////////////////////// -void InitFrames() -{ - if (ServiceExists(MS_CLIST_FRAMES_ADDFRAME)) { - hwnd_frame = CreateDialogW(g_plugin.getInst(), MAKEINTRESOURCE(IDD_CALLS), g_clistApi.hwndContactList, FrameWndProc); - - CLISTFrame Frame = {}; - Frame.cbSize = sizeof(CLISTFrame); - Frame.szName.w = TranslateT("Voice Calls"); - Frame.hWnd = hwnd_frame; - Frame.align = alBottom; - Frame.Flags = F_VISIBLE | F_NOBORDER | F_LOCKED | F_UNICODE; - Frame.height = 0; - Frame.hIcon = g_plugin.getIcon(IDI_MAIN, true); - - frame_id = CallService(MS_CLIST_FRAMES_ADDFRAME, (WPARAM)&Frame, 0); - } -} - -void DeInitFrames() -{ - if (ServiceExists(MS_CLIST_FRAMES_REMOVEFRAME) && frame_id != -1) - CallService(MS_CLIST_FRAMES_REMOVEFRAME, (WPARAM)frame_id, 0); - - if (hwnd_frame != NULL) - DestroyWindow(hwnd_frame); -} - static int GetMaxLineHeight() { return max(ICON_SIZE, font_max_height) + 1; @@ -259,7 +230,7 @@ static void DrawIconLib(HDC hDC, const RECT &rc, int iconId) IcoLib_ReleaseIcon(hIcon); } -static LRESULT CALLBACK FrameWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) +static INT_PTR CALLBACK FrameWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { RECT rc; @@ -739,3 +710,32 @@ static LRESULT CALLBACK FrameWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM } return DefWindowProc(hwnd, msg, wParam, lParam); } + +// Module entry point ///////////////////////////////////////////////////////////////////////////// + +void InitFrames() +{ + if (ServiceExists(MS_CLIST_FRAMES_ADDFRAME)) { + hwnd_frame = CreateDialogW(g_plugin.getInst(), MAKEINTRESOURCE(IDD_CALLS), g_clistApi.hwndContactList, FrameWndProc); + + CLISTFrame Frame = {}; + Frame.cbSize = sizeof(CLISTFrame); + Frame.szName.w = TranslateT("Voice Calls"); + Frame.hWnd = hwnd_frame; + Frame.align = alBottom; + Frame.Flags = F_VISIBLE | F_NOBORDER | F_LOCKED | F_UNICODE; + Frame.height = 0; + Frame.hIcon = g_plugin.getIcon(IDI_MAIN, true); + + frame_id = CallService(MS_CLIST_FRAMES_ADDFRAME, (WPARAM)&Frame, 0); + } +} + +void DeInitFrames() +{ + if (ServiceExists(MS_CLIST_FRAMES_REMOVEFRAME) && frame_id != -1) + CallService(MS_CLIST_FRAMES_REMOVEFRAME, (WPARAM)frame_id, 0); + + if (hwnd_frame != NULL) + DestroyWindow(hwnd_frame); +} |