diff options
author | sje <sje@4f64403b-2f21-0410-a795-97e2b3489a10> | 2007-04-27 15:44:42 +0000 |
---|---|---|
committer | sje <sje@4f64403b-2f21-0410-a795-97e2b3489a10> | 2007-04-27 15:44:42 +0000 |
commit | 97cbc271efbf24fb744f207a71d9a13d605fadf8 (patch) | |
tree | 8857bb01603f839bae6712db6cf1cea8980db45a /yapp/services.cpp | |
parent | 84c424094eb0b051bab9a19436e0ebfb282d03f5 (diff) |
added PUShowMessageW function just for me :)
git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@165 4f64403b-2f21-0410-a795-97e2b3489a10
Diffstat (limited to 'yapp/services.cpp')
-rw-r--r-- | yapp/services.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/yapp/services.cpp b/yapp/services.cpp index ff9bb9f..046a104 100644 --- a/yapp/services.cpp +++ b/yapp/services.cpp @@ -298,6 +298,19 @@ int ShowMessage(WPARAM wParam, LPARAM lParam) { return 0; } +int ShowMessageW(WPARAM wParam, LPARAM lParam) { + if(!DBGetContactSettingByte(0, MODULE, "Enabled", 1)) return 0; + + POPUPDATAW pd = {0}; + wcscpy(pd.lpwzContactName, lParam == SM_WARNING ? L"Warning" : L"Notification"); + pd.lchIcon = LoadIcon(0, lParam == SM_WARNING ? IDI_WARNING : IDI_INFORMATION); + wcsncpy(pd.lpwzText, (wchar_t *)wParam, MAX_SECONDLINE); + + CallService(MS_POPUP_ADDPOPUPW, (WPARAM)&pd, 0); + + return 0; +} + //=====PopUp/ShowHistory //extern BOOL CALLBACK DlgProcHistLstOpts(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam); int PopUp_ShowHistory(WPARAM wParam, LPARAM lParam) @@ -329,6 +342,7 @@ void InitServices() { hService[i++] = CreateServiceFunction(MS_POPUP_QUERY, PopupQuery); hService[i++] = CreateServiceFunction(MS_POPUP_SHOWMESSAGE, ShowMessage); + hService[i++] = CreateServiceFunction(MS_POPUP_SHOWMESSAGE"W", ShowMessageW); hService[i++] = CreateServiceFunction(MS_POPUP_SHOWHISTORY, PopUp_ShowHistory); hService[i++] = CreateServiceFunction("PopUp/ToggleEnabled", TogglePopups); |