summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/ClientChangeNotify/src/ClientChangeNotify.cpp2
-rw-r--r--plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp4
-rw-r--r--plugins/Clist_modern/src/modern_clisttray.cpp10
-rw-r--r--plugins/Clist_modern/src/modern_clui.cpp13
-rw-r--r--plugins/Clist_modern/src/modern_statusbar.cpp6
-rw-r--r--plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp8
-rw-r--r--plugins/Clist_nicer/src/clc.cpp2
-rw-r--r--plugins/Clist_nicer/src/clistmenus.cpp4
-rw-r--r--plugins/Clist_nicer/src/clui.cpp15
-rw-r--r--plugins/ContactsPlus/src/receive.cpp2
-rw-r--r--plugins/ContactsPlus/src/send.cpp3
-rw-r--r--plugins/FTPFileYM/src/dialog.cpp2
-rw-r--r--plugins/FavContacts/src/menu.cpp2
-rw-r--r--plugins/FloatingContacts/src/main.cpp2
-rw-r--r--plugins/HistoryPlusPlus/GlobalSearch.pas2
-rw-r--r--plugins/HistoryPlusPlus/HistoryForm.pas2
-rw-r--r--plugins/MyDetails/src/frame.cpp4
-rw-r--r--plugins/NewAwaySysMod/src/ContactList.cpp2
-rw-r--r--plugins/NewAwaySysMod/src/Notification.cpp2
-rw-r--r--plugins/NewXstatusNotify/src/popup.cpp2
-rw-r--r--plugins/Popup/src/popup_wnd2.cpp2
-rw-r--r--plugins/QuickContacts/src/quickcontacts.cpp2
-rw-r--r--plugins/QuickSearch/sr_window.pas2
-rw-r--r--plugins/RecentContacts/src/RecentContacts.cpp2
-rw-r--r--plugins/Scriver/src/chat/window.cpp4
-rw-r--r--plugins/Scriver/src/infobar.cpp2
-rw-r--r--plugins/Scriver/src/msgdialog.cpp6
-rw-r--r--plugins/SeenPlugin/src/history.cpp2
-rw-r--r--plugins/TabSRMM/src/container.cpp2
-rw-r--r--plugins/TabSRMM/src/controls.cpp7
-rw-r--r--plugins/TabSRMM/src/generic_msghandlers.cpp2
-rw-r--r--plugins/TopToolBar/src/InternalButtons.cpp6
-rw-r--r--plugins/UserInfoEx/src/dlg_anniversarylist.cpp2
-rw-r--r--plugins/Weather/src/weather_mwin.cpp3
-rw-r--r--plugins/Weather/src/weather_popup.cpp2
-rw-r--r--plugins/WhenWasIt/src/dlg_handlers.cpp2
36 files changed, 63 insertions, 74 deletions
diff --git a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp
index 82d8f12ccd..eb57a282fe 100644
--- a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp
+++ b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp
@@ -71,7 +71,7 @@ static VOID NTAPI ShowContactMenu(ULONG_PTR wParam)
POINT pt;
HWND hMenuWnd = CreateWindowEx(WS_EX_TOOLWINDOW, _T("static"), _T(MOD_NAME)_T("_MenuWindow"), 0, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, HWND_DESKTOP, NULL, g_hInstance, NULL);
SetWindowLongPtr(hMenuWnd, GWLP_WNDPROC, (LONG_PTR)MenuWndProc);
- HMENU hMenu = (HMENU)CallService(MS_CLIST_MENUBUILDCONTACT, (WPARAM)wParam, 0);
+ HMENU hMenu = Menu_BuildContactMenu(wParam);
GetCursorPos(&pt);
SetForegroundWindow(hMenuWnd);
CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(TrackPopupMenu(hMenu, TPM_LEFTALIGN | TPM_RIGHTBUTTON | TPM_RETURNCMD, pt.x, pt.y, 0, hMenuWnd, NULL), MPCF_CONTACTMENU), (LPARAM)wParam);
diff --git a/plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp b/plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp
index a63d2279ae..1af388347a 100644
--- a/plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp
+++ b/plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp
@@ -102,12 +102,12 @@ INT_PTR GroupMenuonAddService(WPARAM wParam, LPARAM lParam)
}
if (hGroupMainMenuItemProxy == (HANDLE)lParam) {
mii->fMask |= MIIM_SUBMENU;
- mii->hSubMenu = (HMENU)CallService(MS_CLIST_MENUGETMAIN, 0, 0);
+ mii->hSubMenu = Menu_GetMainMenu();
}
if (hGroupStatusMenuItemProxy == (HANDLE)lParam) {
mii->fMask |= MIIM_SUBMENU;
- mii->hSubMenu = (HMENU)CallService(MS_CLIST_MENUGETSTATUS, 0, 0);
+ mii->hSubMenu = (HMENU)Menu_GetStatusMenu();
}
return TRUE;
diff --git a/plugins/Clist_modern/src/modern_clisttray.cpp b/plugins/Clist_modern/src/modern_clisttray.cpp
index 049e105b36..5dfb00c715 100644
--- a/plugins/Clist_modern/src/modern_clisttray.cpp
+++ b/plugins/Clist_modern/src/modern_clisttray.cpp
@@ -196,12 +196,12 @@ INT_PTR TrayMenuonAddService(WPARAM wParam, LPARAM lParam)
if (hTrayMainMenuItemProxy == (HGENMENU)lParam) {
mii->fMask |= MIIM_SUBMENU;
- mii->hSubMenu = (HMENU)CallService(MS_CLIST_MENUGETMAIN, 0, 0);
+ mii->hSubMenu = Menu_GetMainMenu();
}
if (hTrayStatusMenuItemProxy == (HGENMENU)lParam) {
mii->fMask |= MIIM_SUBMENU;
- mii->hSubMenu = (HMENU)CallService(MS_CLIST_MENUGETSTATUS, 0, 0);
+ mii->hSubMenu = (HMENU)Menu_GetStatusMenu();
}
return(TRUE);
@@ -239,7 +239,7 @@ INT_PTR cli_TrayIconProcessMessage(WPARAM wParam, LPARAM lParam)
case TIM_CALLBACK:
if ((GetAsyncKeyState(VK_CONTROL) & 0x8000) && msg->lParam == WM_LBUTTONDOWN && !db_get_b(NULL, "CList", "Tray1Click", SETTING_TRAY1CLICK_DEFAULT)) {
POINT pt;
- HMENU hMenu = (HMENU)CallService(MS_CLIST_MENUGETSTATUS, 0, 0);
+ HMENU hMenu = (HMENU)Menu_GetStatusMenu();
g_mutex_bOnTrayRightClick = 1;
IS_WM_MOUSE_DOWN_IN_TRAY = 1;
SetForegroundWindow(msg->hwnd);
@@ -357,8 +357,8 @@ void InitTrayMenus(void)
mi.name.a = LPGEN("&About");
Menu_AddTrayMenuItem(&mi);
- hMainMenu = (HMENU)CallService(MS_CLIST_MENUGETMAIN, 0, 0);
- hStatusMenu = (HMENU)CallService(MS_CLIST_MENUGETSTATUS, 0, 0);
+ hMainMenu = Menu_GetMainMenu();
+ hStatusMenu = (HMENU)Menu_GetStatusMenu();
}
void UninitTrayMenu()
diff --git a/plugins/Clist_modern/src/modern_clui.cpp b/plugins/Clist_modern/src/modern_clui.cpp
index d2945e1aa0..d4851203ce 100644
--- a/plugins/Clist_modern/src/modern_clui.cpp
+++ b/plugins/Clist_modern/src/modern_clui.cpp
@@ -213,17 +213,15 @@ int CLUI::OnEvent_ContactMenuPreBuild(WPARAM, LPARAM)
INT_PTR CLUI::Service_ShowMainMenu(WPARAM, LPARAM)
{
- HMENU hMenu = (HMENU)CallService(MS_CLIST_MENUGETMAIN, 0, 0);
-
POINT pt;
GetCursorPos(&pt);
- TrackPopupMenu(hMenu, TPM_TOPALIGN | TPM_LEFTALIGN | TPM_LEFTBUTTON, pt.x, pt.y, 0, pcli->hwndContactList, NULL);
+ TrackPopupMenu(Menu_GetMainMenu(), TPM_TOPALIGN | TPM_LEFTALIGN | TPM_LEFTBUTTON, pt.x, pt.y, 0, pcli->hwndContactList, NULL);
return 0;
}
INT_PTR CLUI::Service_ShowStatusMenu(WPARAM, LPARAM)
{
- HMENU hMenu = (HMENU)CallService(MS_CLIST_MENUGETSTATUS, 0, 0);
+ HMENU hMenu = (HMENU)Menu_GetStatusMenu();
POINT pt;
GetCursorPos(&pt);
@@ -254,10 +252,10 @@ HRESULT CLUI::CreateCluiFrames()
MENUITEMINFO mii = { 0 };
mii.cbSize = sizeof(mii);
mii.fMask = MIIM_SUBMENU;
- mii.hSubMenu = (HMENU)CallService(MS_CLIST_MENUGETMAIN, 0, 0);
+ mii.hSubMenu = Menu_GetMainMenu();
SetMenuItemInfo(g_hMenuMain, 0, TRUE, &mii);
- mii.hSubMenu = (HMENU)CallService(MS_CLIST_MENUGETSTATUS, 0, 0);
+ mii.hSubMenu = (HMENU)Menu_GetStatusMenu();
SetMenuItemInfo(g_hMenuMain, 1, TRUE, &mii);
CreateCLCWindow(pcli->hwndContactList);
@@ -1816,8 +1814,7 @@ LRESULT CLUI::OnUpdate(UINT /*msg*/, WPARAM /*wParam*/, LPARAM /*lParam*/)
LRESULT CLUI::OnInitMenu(UINT /*msg*/, WPARAM /*wParam*/, LPARAM /*lParam*/)
{
if (!CLUI::IsMainMenuInited()) {
- if (ServiceExists(MS_CLIST_MENUBUILDMAIN))
- CallService(MS_CLIST_MENUBUILDMAIN, 0, 0);
+ Menu_BuildMainMenu();
CLUI::m_fMainMenuInited = TRUE;
}
return FALSE;
diff --git a/plugins/Clist_modern/src/modern_statusbar.cpp b/plugins/Clist_modern/src/modern_statusbar.cpp
index 1f087a1cb4..e2b429d3a5 100644
--- a/plugins/Clist_modern/src/modern_statusbar.cpp
+++ b/plugins/Clist_modern/src/modern_statusbar.cpp
@@ -832,12 +832,12 @@ LRESULT CALLBACK ModernStatusProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa
if (msg == WM_RBUTTONDOWN) {
BOOL a = ((g_StatusBarData.perProtoConfig && p.SBarRightClk) || g_StatusBarData.SBarRightClk);
if (a ^ bShift)
- hMenu = (HMENU)CallService(MS_CLIST_MENUGETMAIN, 0, 0);
+ hMenu = Menu_GetMainMenu();
else
- hMenu = (HMENU)CallService(MS_CLIST_MENUGETSTATUS, 0, 0);
+ hMenu = (HMENU)Menu_GetStatusMenu();
}
else {
- hMenu = (HMENU)CallService(MS_CLIST_MENUGETSTATUS, 0, 0);
+ hMenu = (HMENU)Menu_GetStatusMenu();
HMENU hSubMenu = GetSubMenu(hMenu, p.iProtoPos);
if (hSubMenu)
hMenu = hSubMenu;
diff --git a/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp b/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp
index 61911d6617..fd96059baf 100644
--- a/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp
+++ b/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp
@@ -104,12 +104,12 @@ INT_PTR GroupMenuonAddService(WPARAM wParam, LPARAM lParam)
}
if (hGroupMainMenuItemProxy == (HANDLE)lParam) {
mii->fMask |= MIIM_SUBMENU;
- mii->hSubMenu = (HMENU)CallService(MS_CLIST_MENUGETMAIN, 0, 0);
+ mii->hSubMenu = Menu_GetMainMenu();
}
if (hGroupStatusMenuItemProxy == (HANDLE)lParam) {
mii->fMask |= MIIM_SUBMENU;
- mii->hSubMenu = (HMENU)CallService(MS_CLIST_MENUGETSTATUS, 0, 0);
+ mii->hSubMenu = (HMENU)Menu_GetStatusMenu();
}
if (hAppearanceMenuItemProxy == (HANDLE)lParam) {
hMenuOldContext = GetSubMenu(LoadMenu(g_hInst, MAKEINTRESOURCE(IDR_CONTEXT)), 3);
@@ -393,13 +393,13 @@ INT_PTR SubGroupMenuonAddService(WPARAM wParam, LPARAM)
if (hSubGroupMainMenuItemProxy == (HANDLE)lParam) {
mii->fMask |= MIIM_SUBMENU;
//mi.fType = MFT_STRING;
- mii->hSubMenu = (HMENU)CallService(MS_CLIST_MENUGETMAIN, 0, 0);
+ mii->hSubMenu = Menu_GetMainMenu();
}
if (hSubGroupStatusMenuItemProxy == (HANDLE)lParam) {
mii->fMask |= MIIM_SUBMENU;
//mi.fType = MFT_STRING;
- mii->hSubMenu = (HMENU)CallService(MS_CLIST_MENUGETSTATUS, 0, 0);
+ mii->hSubMenu = (HMENU)Menu_GetStatusMenu();
}
*/
return TRUE;
diff --git a/plugins/Clist_nicer/src/clc.cpp b/plugins/Clist_nicer/src/clc.cpp
index 7e73793bfc..3d4195c00e 100644
--- a/plugins/Clist_nicer/src/clc.cpp
+++ b/plugins/Clist_nicer/src/clc.cpp
@@ -699,7 +699,7 @@ LBL_Def:
return 0;
}
else if (contact->type == CLCIT_CONTACT)
- hMenu = (HMENU)CallService(MS_CLIST_MENUBUILDCONTACT, (WPARAM)contact->hContact, 0);
+ hMenu = Menu_BuildContactMenu(contact->hContact);
}
else {
//call parent for new group/hide offline menu
diff --git a/plugins/Clist_nicer/src/clistmenus.cpp b/plugins/Clist_nicer/src/clistmenus.cpp
index af4fc69042..b82d0f7e5d 100644
--- a/plugins/Clist_nicer/src/clistmenus.cpp
+++ b/plugins/Clist_nicer/src/clistmenus.cpp
@@ -388,8 +388,8 @@ int InitCustomMenus(void)
mi.name.a = LPGEN("&Contact list settings...");
Menu_AddContactMenuItem(&mi);
- hMainStatusMenu = (HMENU)CallService(MS_CLIST_MENUGETSTATUS, 0, 0);
- hMainMenu = (HMENU)CallService(MS_CLIST_MENUGETMAIN, 0, 0);
+ hMainStatusMenu = (HMENU)Menu_GetStatusMenu();
+ hMainMenu = Menu_GetMainMenu();
return 0;
}
diff --git a/plugins/Clist_nicer/src/clui.cpp b/plugins/Clist_nicer/src/clui.cpp
index 753a30e51d..6b1021238a 100644
--- a/plugins/Clist_nicer/src/clui.cpp
+++ b/plugins/Clist_nicer/src/clui.cpp
@@ -1440,7 +1440,7 @@ skipbg:
case IDC_STBTOPMENU:
{
RECT rc;
- HMENU hMenu = (HMENU)CallService(MS_CLIST_MENUGETMAIN, 0, 0);
+ HMENU hMenu = Menu_GetMainMenu();
GetButtonRect(GetDlgItem(hwnd, LOWORD(wParam)), &rc);
TrackPopupMenu(hMenu, TPM_TOPALIGN | TPM_LEFTALIGN | TPM_RIGHTBUTTON, rc.left, LOWORD(wParam) == IDC_TBMENU ? rc.top : rc.bottom, 0, hwnd, NULL);
}
@@ -1451,7 +1451,7 @@ skipbg:
case IDC_TBGLOBALSTATUS:
{
RECT rc;
- HMENU hmenu = (HMENU)CallService(MS_CLIST_MENUGETSTATUS, 0, 0);
+ HMENU hmenu = (HMENU)Menu_GetStatusMenu();
GetButtonRect(GetDlgItem(hwnd, LOWORD(wParam)), &rc);
TrackPopupMenu(hmenu, TPM_TOPALIGN | TPM_LEFTALIGN | TPM_RIGHTBUTTON, rc.left, LOWORD(wParam) == IDC_TBGLOBALSTATUS ? rc.top : rc.bottom, 0, hwnd, NULL);
}
@@ -1639,9 +1639,9 @@ buttons_done:
if (PtInRect(&rc, pt)) {
HMENU hMenu;
if (cfg::getByte("CLUI", "SBarRightClk", 0))
- hMenu = (HMENU)CallService(MS_CLIST_MENUGETMAIN, 0, 0);
+ hMenu = Menu_GetMainMenu();
else
- hMenu = (HMENU)CallService(MS_CLIST_MENUGETSTATUS, 0, 0);
+ hMenu = (HMENU)Menu_GetStatusMenu();
TrackPopupMenu(hMenu, TPM_TOPALIGN | TPM_LEFTALIGN | TPM_RIGHTBUTTON, pt.x, pt.y, 0, hwnd, NULL);
return 0;
}
@@ -1917,12 +1917,9 @@ static INT_PTR CLN_ShowAbout(WPARAM, LPARAM)
static INT_PTR CLN_ShowMainMenu(WPARAM, LPARAM)
{
- HMENU hMenu;
POINT pt;
-
- hMenu = (HMENU)CallService(MS_CLIST_MENUGETMAIN, 0, 0);
GetCursorPos(&pt);
- TrackPopupMenu(hMenu, TPM_TOPALIGN | TPM_LEFTALIGN | TPM_LEFTBUTTON, pt.x, pt.y, 0, pcli->hwndContactList, NULL);
+ TrackPopupMenu(Menu_GetMainMenu(), TPM_TOPALIGN | TPM_LEFTALIGN | TPM_LEFTBUTTON, pt.x, pt.y, 0, pcli->hwndContactList, NULL);
return 0;
}
@@ -1931,7 +1928,7 @@ static INT_PTR CLN_ShowStatusMenu(WPARAM, LPARAM)
HMENU hMenu;
POINT pt;
- hMenu = (HMENU)CallService(MS_CLIST_MENUGETSTATUS, 0, 0);
+ hMenu = (HMENU)Menu_GetStatusMenu();
GetCursorPos(&pt);
TrackPopupMenu(hMenu, TPM_TOPALIGN | TPM_LEFTALIGN | TPM_LEFTBUTTON, pt.x, pt.y, 0, pcli->hwndContactList, NULL);
return 0;
diff --git a/plugins/ContactsPlus/src/receive.cpp b/plugins/ContactsPlus/src/receive.cpp
index d14df1492f..1c8596e94d 100644
--- a/plugins/ContactsPlus/src/receive.cpp
+++ b/plugins/ContactsPlus/src/receive.cpp
@@ -380,8 +380,8 @@ INT_PTR CALLBACK RecvDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara
case IDC_USERMENU:
{
RECT rc;
- HMENU hMenu = (HMENU)CallService(MS_CLIST_MENUBUILDCONTACT, (WPARAM)wndData->mhContact, 0);
GetWindowRect(GetDlgItem(hwndDlg,IDC_USERMENU), &rc);
+ HMENU hMenu = Menu_BuildContactMenu(wndData->mhContact);
TrackPopupMenu(hMenu, 0, rc.left, rc.bottom, 0, hwndDlg, NULL);
DestroyMenu(hMenu);
}
diff --git a/plugins/ContactsPlus/src/send.cpp b/plugins/ContactsPlus/src/send.cpp
index f5aaf412e7..ee96c01ea1 100644
--- a/plugins/ContactsPlus/src/send.cpp
+++ b/plugins/ContactsPlus/src/send.cpp
@@ -356,9 +356,8 @@ INT_PTR CALLBACK SendDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara
case IDC_USERMENU:
{
RECT rc;
- HMENU hMenu = (HMENU)CallService(MS_CLIST_MENUBUILDCONTACT, (WPARAM)wndData->hContact, 0);
-
GetWindowRect(GetDlgItem(hwndDlg, IDC_USERMENU), &rc);
+ HMENU hMenu = Menu_BuildContactMenu(wndData->hContact);
TrackPopupMenu(hMenu, 0, rc.left, rc.bottom, 0, hwndDlg, NULL);
DestroyMenu(hMenu);
}
diff --git a/plugins/FTPFileYM/src/dialog.cpp b/plugins/FTPFileYM/src/dialog.cpp
index afe0f4131c..0649431ec4 100644
--- a/plugins/FTPFileYM/src/dialog.cpp
+++ b/plugins/FTPFileYM/src/dialog.cpp
@@ -245,8 +245,8 @@ INT_PTR CALLBACK UploadDialog::UploadDlgProc(HWND hwndDlg, UINT msg, WPARAM wPar
if (hContact != NULL)
{
RECT rc;
- HMENU hMenu = (HMENU)CallService(MS_CLIST_MENUBUILDCONTACT, hContact, 0);
GetWindowRect((HWND)lParam, &rc);
+ HMENU hMenu = Menu_BuildContactMenu(hContact);
TrackPopupMenu(hMenu, 0, rc.left, rc.bottom, 0, hwndDlg, NULL);
DestroyMenu(hMenu);
}
diff --git a/plugins/FavContacts/src/menu.cpp b/plugins/FavContacts/src/menu.cpp
index f4aca7de25..471528de04 100644
--- a/plugins/FavContacts/src/menu.cpp
+++ b/plugins/FavContacts/src/menu.cpp
@@ -421,7 +421,7 @@ static LRESULT CALLBACK MenuHostWndProc(HWND hwnd, UINT message, WPARAM wParam,
if (!CallService(MS_DB_CONTACT_IS, mii.dwItemData, 0))
return FALSE;
- HMENU hMenu = (HMENU)CallService(MS_CLIST_MENUBUILDCONTACT, hContact, 0);
+ HMENU hMenu = Menu_BuildContactMenu(hContact);
POINT pt;
GetCursorPos(&pt);
diff --git a/plugins/FloatingContacts/src/main.cpp b/plugins/FloatingContacts/src/main.cpp
index 22a9c99a75..aa450c50b7 100644
--- a/plugins/FloatingContacts/src/main.cpp
+++ b/plugins/FloatingContacts/src/main.cpp
@@ -322,7 +322,7 @@ static void ShowContactMenu(HWND hwnd, POINT pt)
{
ThumbInfo *pThumb = thumbList.FindThumb(hwnd);
if (pThumb != NULL) {
- hContactMenu = (HMENU)CallService(MS_CLIST_MENUBUILDCONTACT, (WPARAM)pThumb->hContact, 0);
+ hContactMenu = Menu_BuildContactMenu(pThumb->hContact);
if (hContactMenu == NULL)
return;
diff --git a/plugins/HistoryPlusPlus/GlobalSearch.pas b/plugins/HistoryPlusPlus/GlobalSearch.pas
index cc8e087680..5454de3ffe 100644
--- a/plugins/HistoryPlusPlus/GlobalSearch.pas
+++ b/plugins/HistoryPlusPlus/GlobalSearch.pas
@@ -1369,7 +1369,7 @@ begin
hContact := THandle(Item.Data);
if hContact = 0 then
exit;
- UserMenu := CallService(MS_CLIST_MENUBUILDCONTACT, hContact, 0);
+ UserMenu := Menu_BuildContactMenu(hContact);
if UserMenu <> 0 then
begin
UserMenuContact := hContact;
diff --git a/plugins/HistoryPlusPlus/HistoryForm.pas b/plugins/HistoryPlusPlus/HistoryForm.pas
index 095ce2f5b2..5593f130f1 100644
--- a/plugins/HistoryPlusPlus/HistoryForm.pas
+++ b/plugins/HistoryPlusPlus/HistoryForm.pas
@@ -3654,7 +3654,7 @@ procedure THistoryFrm.tbUserMenuClick(Sender: TObject);
var
p: TPoint;
begin
- UserMenu := CallService(MS_CLIST_MENUBUILDCONTACT, hContact, 0);
+ UserMenu := Menu_BuildContactMenu(hContact);
if UserMenu <> 0 then
begin
p := tbUserMenu.ClientToScreen(Point(0, tbUserMenu.Height));
diff --git a/plugins/MyDetails/src/frame.cpp b/plugins/MyDetails/src/frame.cpp
index 0f507c95fd..0dc9c42f6f 100644
--- a/plugins/MyDetails/src/frame.cpp
+++ b/plugins/MyDetails/src/frame.cpp
@@ -1384,7 +1384,7 @@ void MakeHover(HWND hwnd, bool draw, bool *hover, POINT *p, RECT *r)
void ShowGlobalStatusMenu(HWND hwnd, MyDetailsFrameData *data, POINT &p)
{
- HMENU submenu = (HMENU)CallService(MS_CLIST_MENUGETSTATUS, 0, 0);
+ HMENU submenu = Menu_GetStatusMenu();
p.x = (opts.draw_text_align_right ? data->status_rect.right : data->status_rect.left);
p.y = data->status_rect.bottom + 1;
@@ -1399,7 +1399,7 @@ void ShowGlobalStatusMenu(HWND hwnd, MyDetailsFrameData *data, POINT &p)
void ShowProtocolStatusMenu(HWND hwnd, MyDetailsFrameData *data, Protocol *proto, POINT &p)
{
- HMENU menu = (HMENU)CallService(MS_CLIST_MENUGETSTATUS, 0, 0);
+ HMENU menu = Menu_GetStatusMenu();
HMENU submenu = NULL;
if (menu != NULL) {
diff --git a/plugins/NewAwaySysMod/src/ContactList.cpp b/plugins/NewAwaySysMod/src/ContactList.cpp
index 6b5e192793..76791ae33e 100644
--- a/plugins/NewAwaySysMod/src/ContactList.cpp
+++ b/plugins/NewAwaySysMod/src/ContactList.cpp
@@ -316,7 +316,7 @@ static LRESULT CALLBACK ContactListSubclassProc(HWND hWnd, UINT Msg, WPARAM wPar
if (hItem) {
MCONTACT hContact = dat->GetItemData(hItem).hContact;
if (IsHContactContact(hContact)) {
- HMENU hMenu = (HMENU)CallService(MS_CLIST_MENUBUILDCONTACT, hContact, 0);
+ HMENU hMenu = Menu_BuildContactMenu(hContact);
if (hMenu) {
ClientToScreen(hWnd, &pt);
CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(TrackPopupMenu(hMenu, TPM_LEFTALIGN | TPM_RIGHTBUTTON | TPM_RETURNCMD, pt.x, pt.y, 0, hWnd, NULL), MPCF_CONTACTMENU), hContact);
diff --git a/plugins/NewAwaySysMod/src/Notification.cpp b/plugins/NewAwaySysMod/src/Notification.cpp
index c25182270e..fff41162fe 100644
--- a/plugins/NewAwaySysMod/src/Notification.cpp
+++ b/plugins/NewAwaySysMod/src/Notification.cpp
@@ -55,7 +55,7 @@ static VOID CALLBACK ShowContactMenu(MCONTACT hContact)
POINT pt;
HWND hMenuWnd = CreateWindowEx(WS_EX_TOOLWINDOW, _T("static"), _T(MOD_NAME)_T("_MenuWindow"), 0, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, HWND_DESKTOP, NULL, g_hInstance, NULL);
SetWindowLongPtr(hMenuWnd, GWLP_WNDPROC, (LONG_PTR)MenuWndProc);
- HMENU hMenu = (HMENU)CallService(MS_CLIST_MENUBUILDCONTACT, hContact, 0);
+ HMENU hMenu = Menu_BuildContactMenu(hContact);
GetCursorPos(&pt);
SetForegroundWindow(hMenuWnd);
CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(TrackPopupMenu(hMenu, TPM_LEFTALIGN | TPM_RIGHTBUTTON | TPM_RETURNCMD, pt.x, pt.y, 0, hMenuWnd, NULL), MPCF_CONTACTMENU), hContact);
diff --git a/plugins/NewXstatusNotify/src/popup.cpp b/plugins/NewXstatusNotify/src/popup.cpp
index 336b88f267..d92a93f525 100644
--- a/plugins/NewXstatusNotify/src/popup.cpp
+++ b/plugins/NewXstatusNotify/src/popup.cpp
@@ -123,8 +123,8 @@ void PopupAction(HWND hWnd, BYTE action)
case PCA_OPENMENU:
{
POINT pt = { 0 };
- HMENU hMenu = (HMENU)CallService(MS_CLIST_MENUBUILDCONTACT, hContact, 0);
GetCursorPos(&pt);
+ HMENU hMenu = Menu_BuildContactMenu(hContact);
TrackPopupMenu(hMenu, 0, pt.x, pt.y, 0, hWnd, NULL);
DestroyMenu(hMenu);
}
diff --git a/plugins/Popup/src/popup_wnd2.cpp b/plugins/Popup/src/popup_wnd2.cpp
index 31dc8a4962..3c193c4848 100644
--- a/plugins/Popup/src/popup_wnd2.cpp
+++ b/plugins/Popup/src/popup_wnd2.cpp
@@ -1299,8 +1299,8 @@ LRESULT CALLBACK MenuHostWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM
hContact = lParam;
{
POINT pt = { 0 };
- HMENU hMenu = (HMENU)CallService(MS_CLIST_MENUBUILDCONTACT, hContact, 0);
GetCursorPos(&pt);
+ HMENU hMenu = Menu_BuildContactMenu(hContact);
HWND hwndSave = GetForegroundWindow();
SetForegroundWindow(hwnd);
TrackPopupMenu(hMenu, 0, pt.x, pt.y, 0, hwnd, NULL);
diff --git a/plugins/QuickContacts/src/quickcontacts.cpp b/plugins/QuickContacts/src/quickcontacts.cpp
index 314ddb1740..e49a7a5318 100644
--- a/plugins/QuickContacts/src/quickcontacts.cpp
+++ b/plugins/QuickContacts/src/quickcontacts.cpp
@@ -934,7 +934,7 @@ static INT_PTR CALLBACK MainDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
RECT rc;
GetWindowRect(GetDlgItem(hwndDlg, IDC_MENU), &rc);
- HMENU hMenu = (HMENU) CallService(MS_CLIST_MENUBUILDCONTACT, hContact, 0);
+ HMENU hMenu = Menu_BuildContactMenu(hContact);
int ret = TrackPopupMenu(hMenu, TPM_TOPALIGN|TPM_RIGHTBUTTON|TPM_RETURNCMD, rc.left, rc.bottom, 0, hwndDlg, NULL);
DestroyMenu(hMenu);
diff --git a/plugins/QuickSearch/sr_window.pas b/plugins/QuickSearch/sr_window.pas
index 265bfbbfa1..7399147902 100644
--- a/plugins/QuickSearch/sr_window.pas
+++ b/plugins/QuickSearch/sr_window.pas
@@ -823,7 +823,7 @@ begin
end;
GetCursorPos(pt);
- result:=CallService(MS_CLIST_MENUBUILDCONTACT,hContact,0);
+ result:=Menu_BuildContactMenu(hContact);
if result<>0 then
begin
TrackPopupMenu(result,0,pt.x,pt.y,0,wnd,nil);
diff --git a/plugins/RecentContacts/src/RecentContacts.cpp b/plugins/RecentContacts/src/RecentContacts.cpp
index 1b1fa73cbd..3e1daa0cf7 100644
--- a/plugins/RecentContacts/src/RecentContacts.cpp
+++ b/plugins/RecentContacts/src/RecentContacts.cpp
@@ -127,7 +127,7 @@ BOOL ShowListMainDlgProc_OpenContactMenu(HWND hDlg, HWND hList, int item, LASTUC
lvi.iSubItem = 0;
ListView_GetItem(hList, &lvi);
if (lvi.lParam != NULL) {
- HMENU hCMenu = (HMENU)CallService(MS_CLIST_MENUBUILDCONTACT, (WPARAM)lvi.lParam, NULL);
+ HMENU hCMenu = Menu_BuildContactMenu(lvi.lParam);
if (hCMenu != NULL) {
POINT p;
GetCursorPos(&p);
diff --git a/plugins/Scriver/src/chat/window.cpp b/plugins/Scriver/src/chat/window.cpp
index a01119de72..895f2b7765 100644
--- a/plugins/Scriver/src/chat/window.cpp
+++ b/plugins/Scriver/src/chat/window.cpp
@@ -1946,12 +1946,12 @@ LABEL_SHOWWINDOW:
return TRUE;
case DM_GETCONTEXTMENU:
- SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, CallService(MS_CLIST_MENUBUILDCONTACT, si->hContact, 0));
+ SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, (LPARAM)Menu_BuildContactMenu(si->hContact));
return TRUE;
case WM_CONTEXTMENU:
if (GetParent(hwndDlg) == (HWND)wParam) {
- HMENU hMenu = (HMENU)CallService(MS_CLIST_MENUBUILDCONTACT, si->hContact, 0);
+ HMENU hMenu = Menu_BuildContactMenu(si->hContact);
GetCursorPos(&pt);
TrackPopupMenu(hMenu, 0, pt.x, pt.y, 0, hwndDlg, NULL);
DestroyMenu(hMenu);
diff --git a/plugins/Scriver/src/infobar.cpp b/plugins/Scriver/src/infobar.cpp
index 027dc2dd47..5ffc65d91c 100644
--- a/plugins/Scriver/src/infobar.cpp
+++ b/plugins/Scriver/src/infobar.cpp
@@ -271,7 +271,7 @@ static INT_PTR CALLBACK InfobarWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA
case WM_RBUTTONUP:
{
- HMENU hMenu = (HMENU)CallService(MS_CLIST_MENUBUILDCONTACT, idat->mwd->hContact, 0);
+ HMENU hMenu = Menu_BuildContactMenu(idat->mwd->hContact);
POINT pt;
GetCursorPos(&pt);
diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp
index aa95a35a46..5691a9d3c8 100644
--- a/plugins/Scriver/src/msgdialog.cpp
+++ b/plugins/Scriver/src/msgdialog.cpp
@@ -905,7 +905,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
case DM_GETCONTEXTMENU:
{
- HMENU hMenu = (HMENU)CallService(MS_CLIST_MENUBUILDCONTACT, dat->hContact, 0);
+ HMENU hMenu = Menu_BuildContactMenu(dat->hContact);
SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, (LONG_PTR)hMenu);
}
return TRUE;
@@ -913,7 +913,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
case WM_CONTEXTMENU:
if (dat->hwndParent == (HWND)wParam) {
POINT pt;
- HMENU hMenu = (HMENU)CallService(MS_CLIST_MENUBUILDCONTACT, dat->hContact, 0);
+ HMENU hMenu = Menu_BuildContactMenu(dat->hContact);
GetCursorPos(&pt);
TrackPopupMenu(hMenu, 0, pt.x, pt.y, 0, hwndDlg, NULL);
DestroyMenu(hMenu);
@@ -1636,7 +1636,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
SendMessage(hwndDlg, DM_USERNAMETOCLIP, 0, 0);
else {
RECT rc;
- HMENU hMenu = (HMENU)CallService(MS_CLIST_MENUBUILDCONTACT, dat->hContact, 0);
+ HMENU hMenu = Menu_BuildContactMenu(dat->hContact);
GetWindowRect(GetDlgItem(hwndDlg, LOWORD(wParam)), &rc);
TrackPopupMenu(hMenu, 0, rc.left, rc.bottom, 0, hwndDlg, NULL);
DestroyMenu(hMenu);
diff --git a/plugins/SeenPlugin/src/history.cpp b/plugins/SeenPlugin/src/history.cpp
index 9bc055125f..e5ffbfcc9e 100644
--- a/plugins/SeenPlugin/src/history.cpp
+++ b/plugins/SeenPlugin/src/history.cpp
@@ -222,8 +222,8 @@ INT_PTR CALLBACK HistoryDlgProc(HWND hwndDlg, UINT Message, WPARAM wparam, LPARA
case IDC_USERMENU:
{
RECT rc;
- HMENU hMenu = (HMENU)CallService(MS_CLIST_MENUBUILDCONTACT, hContact, 0);
GetWindowRect(GetDlgItem(hwndDlg, IDC_USERMENU), &rc);
+ HMENU hMenu = Menu_BuildContactMenu(hContact);
TrackPopupMenu(hMenu, 0, rc.left, rc.bottom, 0, hwndDlg, NULL);
DestroyMenu(hMenu);
}
diff --git a/plugins/TabSRMM/src/container.cpp b/plugins/TabSRMM/src/container.cpp
index f863d29df0..eee8436feb 100644
--- a/plugins/TabSRMM/src/container.cpp
+++ b/plugins/TabSRMM/src/container.cpp
@@ -757,7 +757,7 @@ static INT_PTR CALLBACK DlgProcContainer(HWND hwndDlg, UINT msg, WPARAM wParam,
SendMessage(pContainer->hwndActive, DM_QUERYHCONTACT, 0, (LPARAM)&hContact);
if (hContact) {
int iSel = 0;
- HMENU hMenu = (HMENU)CallService(MS_CLIST_MENUBUILDCONTACT, hContact, 0);
+ HMENU hMenu = Menu_BuildContactMenu(hContact);
iSel = TrackPopupMenu(hMenu, TPM_RETURNCMD, pt.x, pt.y, 0, hwndDlg, NULL);
if (iSel)
CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(LOWORD(iSel), MPCF_CONTACTMENU), hContact);
diff --git a/plugins/TabSRMM/src/controls.cpp b/plugins/TabSRMM/src/controls.cpp
index 7afb2db8dd..0d84f4381b 100644
--- a/plugins/TabSRMM/src/controls.cpp
+++ b/plugins/TabSRMM/src/controls.cpp
@@ -389,15 +389,14 @@ void CMenuBar::invoke(const int id)
MCONTACT hContact = dat ? dat->hContact : 0;
if (index == 3 && hContact != 0) {
- hMenu = reinterpret_cast<HMENU>(::CallService(MS_CLIST_MENUBUILDCONTACT, hContact, 0));
+ hMenu = Menu_BuildContactMenu(hContact);
m_isContactMenu = true;
}
else if (index == 0) {
- hMenu = reinterpret_cast<HMENU>(::CallService(MS_CLIST_MENUBUILDMAIN, 0, 0));
+ hMenu = Menu_BuildMainMenu();
m_isMainMenu = true;
}
- else
- hMenu = reinterpret_cast<HMENU>(m_TbButtons[index].dwData);
+ else hMenu = reinterpret_cast<HMENU>(m_TbButtons[index].dwData);
RECT rcButton;
POINT pt;
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp
index 5075eaef36..1f647c7d5a 100644
--- a/plugins/TabSRMM/src/generic_msghandlers.cpp
+++ b/plugins/TabSRMM/src/generic_msghandlers.cpp
@@ -559,7 +559,7 @@ LRESULT TSAPI DM_MsgWindowCmdHandler(HWND hwndDlg, TContainerData *m_pContainer,
break;
case IDC_PROTOCOL:
- submenu = (HMENU)CallService(MS_CLIST_MENUBUILDCONTACT, dat->hContact, 0);
+ submenu = Menu_BuildContactMenu(dat->hContact);
if (lParam == 0)
GetWindowRect(GetDlgItem(hwndDlg, IDC_PROTOCOL), &rc);
else
diff --git a/plugins/TopToolBar/src/InternalButtons.cpp b/plugins/TopToolBar/src/InternalButtons.cpp
index 347bbc9620..ac0869d4a2 100644
--- a/plugins/TopToolBar/src/InternalButtons.cpp
+++ b/plugins/TopToolBar/src/InternalButtons.cpp
@@ -63,17 +63,15 @@ int OnSettingChanging(WPARAM hContact, LPARAM lParam)
INT_PTR TTBInternalMainMenuButt(WPARAM wParam, LPARAM lParam)
{
- HMENU hMenu = (HMENU)CallService(MS_CLIST_MENUGETMAIN, 0, 0);
-
POINT pt;
GetCursorPos(&pt);
- TrackPopupMenu(hMenu, TPM_TOPALIGN | TPM_LEFTALIGN | TPM_RIGHTBUTTON, pt.x, pt.y, 0, pcli->hwndContactList, NULL);
+ TrackPopupMenu(Menu_GetMainMenu(), TPM_TOPALIGN | TPM_LEFTALIGN | TPM_RIGHTBUTTON, pt.x, pt.y, 0, pcli->hwndContactList, NULL);
return 0;
}
INT_PTR TTBInternalStatusMenuButt(WPARAM wParam, LPARAM lParam)
{
- HMENU hMenu = (HMENU)CallService(MS_CLIST_MENUGETSTATUS, 0, 0);
+ HMENU hMenu = (HMENU)Menu_GetStatusMenu();
POINT pt;
GetCursorPos(&pt);
diff --git a/plugins/UserInfoEx/src/dlg_anniversarylist.cpp b/plugins/UserInfoEx/src/dlg_anniversarylist.cpp
index 89acc46117..1921080234 100644
--- a/plugins/UserInfoEx/src/dlg_anniversarylist.cpp
+++ b/plugins/UserInfoEx/src/dlg_anniversarylist.cpp
@@ -411,7 +411,7 @@ class CAnnivList
{
CItemData *pid = pDlg->ItemData(pDlg->_curSel);
if (pid) {
- HMENU hPopup = (HMENU)CallService(MS_CLIST_MENUBUILDCONTACT, (WPARAM)pid->_hContact, 0);
+ HMENU hPopup = Menu_BuildContactMenu(pid->_hContact);
if (hPopup) {
POINT pt;
GetCursorPos(&pt);
diff --git a/plugins/Weather/src/weather_mwin.cpp b/plugins/Weather/src/weather_mwin.cpp
index 5e24376a91..3fa95e3616 100644
--- a/plugins/Weather/src/weather_mwin.cpp
+++ b/plugins/Weather/src/weather_mwin.cpp
@@ -60,9 +60,8 @@ static LRESULT CALLBACK wndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara
case WM_CONTEXTMENU:
{
POINT pt;
-
- HMENU hMenu = (HMENU)CallService(MS_CLIST_MENUBUILDCONTACT, (WPARAM)data->hContact, 0);
GetCursorPos(&pt);
+ HMENU hMenu = Menu_BuildContactMenu(data->hContact);
TrackPopupMenu(hMenu, TPM_LEFTALIGN, pt.x, pt.y, 0, hwnd, NULL);
DestroyMenu(hMenu);
}
diff --git a/plugins/Weather/src/weather_popup.cpp b/plugins/Weather/src/weather_popup.cpp
index 30c4c2a78e..09c4e4fe6b 100644
--- a/plugins/Weather/src/weather_popup.cpp
+++ b/plugins/Weather/src/weather_popup.cpp
@@ -176,7 +176,7 @@ LRESULT CALLBACK PopupWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam
break;
case IDM_M7: // display contact menu
- hMenu = (HMENU)CallService(MS_CLIST_MENUBUILDCONTACT,wParam,0);
+ hMenu = Menu_BuildContactMenu(wParam);
GetCursorPos(&pt);
hPopupContact = (HANDLE)wParam;
TrackPopupMenu(hMenu,TPM_LEFTALIGN,pt.x,pt.y,0,hWnd,NULL);
diff --git a/plugins/WhenWasIt/src/dlg_handlers.cpp b/plugins/WhenWasIt/src/dlg_handlers.cpp
index caa196e5d8..899904ccb4 100644
--- a/plugins/WhenWasIt/src/dlg_handlers.cpp
+++ b/plugins/WhenWasIt/src/dlg_handlers.cpp
@@ -677,7 +677,7 @@ static LRESULT CALLBACK BirthdaysListSubclassProc(HWND hWnd, UINT msg, WPARAM wP
item.iItem = i;
ListView_GetItem(hWnd, &item);
hContact = (MCONTACT)item.lParam;
- HMENU hMenu = (HMENU)CallService(MS_CLIST_MENUBUILDCONTACT, (WPARAM)hContact, 0);
+ HMENU hMenu = Menu_BuildContactMenu(hContact);
if (hMenu != NULL) {
CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(TrackPopupMenu(hMenu, TPM_RIGHTBUTTON | TPM_RETURNCMD, pt.x, pt.y, 0, hWnd, NULL), MPCF_CONTACTMENU), hContact);
DestroyMenu(hMenu);