summaryrefslogtreecommitdiff
path: root/plugins/Clist_mw
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Clist_mw')
-rw-r--r--plugins/Clist_mw/src/CLUIFrames/cluiframes.cpp30
-rw-r--r--plugins/Clist_mw/src/CLUIFrames/extraimage.cpp2
-rw-r--r--plugins/Clist_mw/src/CLUIFrames/framesmenu.cpp2
-rw-r--r--plugins/Clist_mw/src/CLUIFrames/statusbar.cpp6
-rw-r--r--plugins/Clist_mw/src/clcitems.cpp2
-rw-r--r--plugins/Clist_mw/src/clistmenus.cpp2
-rw-r--r--plugins/Clist_mw/src/clistmod.cpp2
-rw-r--r--plugins/Clist_mw/src/clistopts.cpp2
-rw-r--r--plugins/Clist_mw/src/clisttray.cpp26
-rw-r--r--plugins/Clist_mw/src/clui.cpp174
-rw-r--r--plugins/Clist_mw/src/cluiservices.cpp4
-rw-r--r--plugins/Clist_mw/src/groupmenu.cpp42
12 files changed, 145 insertions, 149 deletions
diff --git a/plugins/Clist_mw/src/CLUIFrames/cluiframes.cpp b/plugins/Clist_mw/src/CLUIFrames/cluiframes.cpp
index b8d21480e0..9e32704f03 100644
--- a/plugins/Clist_mw/src/CLUIFrames/cluiframes.cpp
+++ b/plugins/Clist_mw/src/CLUIFrames/cluiframes.cpp
@@ -1025,19 +1025,19 @@ INT_PTR CLUIFramesSetFrameOptions(WPARAM wParam,LPARAM lParam)
if (flag&F_NOBORDER) {style &= (~WS_BORDER);}
SetWindowLongPtr(Frames[pos].hWnd,GWL_STYLE,(LONG)style);
ulockfrm();
- CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList,(LPARAM)0);
+ CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList,0);
return 0;
}
case FO_NAME:
- if (lParam == (LPARAM)NULL) {ulockfrm(); return -1;}
+ if (lParam == 0) {ulockfrm(); return -1;}
mir_free(Frames[pos].name);
Frames[pos].name = mir_tstrdup((LPTSTR)lParam);
ulockfrm();
return 0;
case FO_TBNAME:
- if (lParam == (LPARAM)NULL) {ulockfrm(); return(-1);}
+ if (lParam == 0) {ulockfrm(); return(-1);}
mir_free(Frames[pos].TitleBar.tbname);
Frames[pos].TitleBar.tbname = mir_tstrdup((LPTSTR)lParam);
ulockfrm();
@@ -1045,7 +1045,7 @@ INT_PTR CLUIFramesSetFrameOptions(WPARAM wParam,LPARAM lParam)
return 0;
case FO_TBTIPNAME:
- if (lParam == (LPARAM)NULL) {ulockfrm(); return(-1);}
+ if (lParam == 0) {ulockfrm(); return(-1);}
mir_free(Frames[pos].TitleBar.tooltip);
Frames[pos].TitleBar.tooltip = mir_tstrdup((LPTSTR)lParam);
UpdateTBToolTip(pos);
@@ -1106,7 +1106,7 @@ INT_PTR CLUIFramesSetFrameOptions(WPARAM wParam,LPARAM lParam)
return 0;
}
ulockfrm();
- CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList,(LPARAM)0);
+ CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList,0);
return -1;
}
@@ -1115,7 +1115,7 @@ static INT_PTR CLUIFramesShowAll(WPARAM wParam,LPARAM lParam)
{
for (int i = 0;i<nFramescount;i++)
Frames[i].visible = TRUE;
- CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList,(LPARAM)0);
+ CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList,0);
return 0;
}
@@ -1124,7 +1124,7 @@ INT_PTR CLUIFramesShowAllTitleBars(WPARAM wParam,LPARAM lParam)
{
for (int i = 0;i<nFramescount;i++)
Frames[i].TitleBar.ShowTitleBar = TRUE;
- CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList,(LPARAM)0);
+ CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList,0);
return 0;
}
@@ -1133,7 +1133,7 @@ INT_PTR CLUIFramesHideAllTitleBars(WPARAM wParam,LPARAM lParam)
{
for (int i = 0;i<nFramescount;i++)
Frames[i].TitleBar.ShowTitleBar = FALSE;
- CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList,(LPARAM)0);
+ CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList,0);
return 0;
}
@@ -1149,7 +1149,7 @@ INT_PTR CLUIFramesShowHideFrame(WPARAM wParam,LPARAM lParam)
ulockfrm();
if (!Frames[pos].floating)
- CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList,(LPARAM)0);
+ CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList,0);
return 0;
}
@@ -1163,7 +1163,7 @@ INT_PTR CLUIFramesShowHideFrameTitleBar(WPARAM wParam,LPARAM lParam)
ulockfrm();
- CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList,(LPARAM)0);
+ CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList,0);
return 0;
}
@@ -1614,7 +1614,7 @@ INT_PTR CLUIFramesAddFrame(WPARAM wParam,LPARAM lParam)
ti.hinst = g_hInst;
ti.uFlags = TTF_IDISHWND|TTF_SUBCLASS ;
ti.uId = (UINT_PTR)Frames[nFramescount].TitleBar.hwnd;
- SendMessage(Frames[nFramescount].TitleBar.hwndTip,TTM_ADDTOOL,(WPARAM)0,(LPARAM)&ti);
+ SendMessage(Frames[nFramescount].TitleBar.hwndTip,TTM_ADDTOOL,0,(LPARAM)&ti);
SendMessage(Frames[nFramescount].TitleBar.hwndTip,TTM_ACTIVATE,(WPARAM)Frames[nFramescount].TitleBar.ShowTitleBarTip,0);
@@ -1916,7 +1916,7 @@ int CLUIFramesResize(const RECT newsize)
INT_PTR CLUIFramesUpdateFrame(WPARAM wParam,LPARAM lParam)
{
if (FramesSysNotStarted) return -1;
- if (wParam == -1) { CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList,(LPARAM)0); return 0;}
+ if (wParam == -1) { CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList,0); return 0;}
if (lParam&FU_FMPOS) CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList,1);
lockfrm();
wParam = id2pos(wParam);
@@ -2246,7 +2246,7 @@ LRESULT CALLBACK CLUIFrameTitleBarProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA
CLUIFrameSetFloat(Frameid,0);
break;
}
- CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList,(LPARAM)0);
+ CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList,0);
}
break;
@@ -2361,7 +2361,7 @@ LRESULT CALLBACK CLUIFrameTitleBarProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA
Frames[pos].FloatingSize.x,Frames[pos].FloatingSize.y,
Frames[pos].order);
- oldflags = CallService(MS_CLIST_FRAMES_GETFRAMEOPTIONS,MAKEWPARAM(FO_FLAGS,Frames[pos].id),(LPARAM)0);
+ oldflags = CallService(MS_CLIST_FRAMES_GETFRAMEOPTIONS,MAKEWPARAM(FO_FLAGS,Frames[pos].id),0);
if ( !(oldflags & F_SHOWTBTIP))
oldflags |= F_SHOWTBTIP;
}
@@ -2664,7 +2664,7 @@ LRESULT CALLBACK CLUIFrameContainerWndProc(HWND hwnd, UINT msg, WPARAM wParam, L
}
memset(&minmax,0,sizeof(minmax));
- if (SendMessage(Frames[framepos].hWnd,WM_GETMINMAXINFO,(WPARAM)0,(LPARAM)&minmax) == 0) {
+ if (SendMessage(Frames[framepos].hWnd,WM_GETMINMAXINFO,0,(LPARAM)&minmax) == 0) {
RECT border;
int tbh = TitleBarH*btoint(Frames[framepos].TitleBar.ShowTitleBar);
GetBorderSize(hwnd,&border);
diff --git a/plugins/Clist_mw/src/CLUIFrames/extraimage.cpp b/plugins/Clist_mw/src/CLUIFrames/extraimage.cpp
index 49cc833397..d84b30a9fa 100644
--- a/plugins/Clist_mw/src/CLUIFrames/extraimage.cpp
+++ b/plugins/Clist_mw/src/CLUIFrames/extraimage.cpp
@@ -193,7 +193,7 @@ void ReloadExtraIcons()
HICON hicon;
SendMessage(pcli->hwndContactTree,CLM_SETEXTRACOLUMNSSPACE,DBGetContactSettingByte(NULL,"CLUI","ExtraColumnSpace",18),0);
- SendMessage(pcli->hwndContactTree,CLM_SETEXTRAIMAGELIST,0,(LPARAM)NULL);
+ SendMessage(pcli->hwndContactTree,CLM_SETEXTRAIMAGELIST,0,0);
if (hExtraImageList){ImageList_Destroy(hExtraImageList);};
hExtraImageList = ImageList_Create(GetSystemMetrics(SM_CXSMICON),GetSystemMetrics(SM_CYSMICON),ILC_COLOR32|ILC_MASK,1,256);
diff --git a/plugins/Clist_mw/src/CLUIFrames/framesmenu.cpp b/plugins/Clist_mw/src/CLUIFrames/framesmenu.cpp
index 7ce6bdd2a1..d3c0480cd1 100644
--- a/plugins/Clist_mw/src/CLUIFrames/framesmenu.cpp
+++ b/plugins/Clist_mw/src/CLUIFrames/framesmenu.cpp
@@ -212,7 +212,7 @@ int InitFramesMenus(void)
op.Handle = hFrameMenuObject;
op.Setting = OPT_MENUOBJECT_SET_FREE_SERVICE;
op.Value = (INT_PTR)"FrameMenuFreeService";
- CallService(MO_SETOPTIONSMENUOBJECT,(WPARAM)0,(LPARAM)&op);
+ CallService(MO_SETOPTIONSMENUOBJECT,0,(LPARAM)&op);
}
}
return 0;
diff --git a/plugins/Clist_mw/src/CLUIFrames/statusbar.cpp b/plugins/Clist_mw/src/CLUIFrames/statusbar.cpp
index 319f4f8f63..ba6c8e4304 100644
--- a/plugins/Clist_mw/src/CLUIFrames/statusbar.cpp
+++ b/plugins/Clist_mw/src/CLUIFrames/statusbar.cpp
@@ -265,7 +265,7 @@ void DrawBackGround(HWND hwnd,HDC mhdc)
for (nPanel = 0;nPanel<nParts;nPanel++)
{
- PD = (ProtocolData *)SendMessage(pcli->hwndStatus,SB_GETTEXT,(WPARAM)nPanel,(LPARAM)0);
+ PD = (ProtocolData *)SendMessage(pcli->hwndStatus,SB_GETTEXT,(WPARAM)nPanel,0);
if (PD == NULL){
continue;
}
@@ -408,7 +408,7 @@ LRESULT CALLBACK StatusHelperProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa
for (i = 0;i<nParts;i++) {
SendMessage(pcli->hwndStatus,SB_GETRECT,i,(LPARAM)&rc);
if (PtInRect(&rc,pt)) {
- PD = (ProtocolData *)SendMessage(pcli->hwndStatus,SB_GETTEXT,i,(LPARAM)0);
+ PD = (ProtocolData *)SendMessage(pcli->hwndStatus,SB_GETTEXT,i,0);
if (PD == NULL){return 0;}
NotifyEventHooks(hStatusBarShowToolTipEvent,(WPARAM)PD->RealName,0);
@@ -553,7 +553,7 @@ HANDLE CreateStatusBarFrame()
Frame.tname = _T("Status");
Frame.TBtname = TranslateT("Status Bar");
- hFrameHelperStatusBar = (HANDLE)CallService(MS_CLIST_FRAMES_ADDFRAME,(WPARAM)&Frame,(LPARAM)0);
+ hFrameHelperStatusBar = (HANDLE)CallService(MS_CLIST_FRAMES_ADDFRAME,(WPARAM)&Frame,0);
return hFrameHelperStatusBar;
diff --git a/plugins/Clist_mw/src/clcitems.cpp b/plugins/Clist_mw/src/clcitems.cpp
index 24c37b102e..718a238cb8 100644
--- a/plugins/Clist_mw/src/clcitems.cpp
+++ b/plugins/Clist_mw/src/clcitems.cpp
@@ -140,7 +140,7 @@ static struct ClcContact * AddContactToGroup(struct ClcData *dat,ClcGroup *group
_snprintf(AdvancedService,sizeof(AdvancedService),"%s%s",cacheEntry->szProto,"/GetAdvancedStatusIcon");
if (ServiceExists(AdvancedService))
- img = CallService(AdvancedService,(WPARAM)hContact, (LPARAM)0);
+ img = CallService(AdvancedService,(WPARAM)hContact, 0);
if (img == -1 || !(LOWORD(img)))
img = CallService(MS_CLIST_GETCONTACTICON,(WPARAM)hContact,0);
diff --git a/plugins/Clist_mw/src/clistmenus.cpp b/plugins/Clist_mw/src/clistmenus.cpp
index db84dca927..423e58bb26 100644
--- a/plugins/Clist_mw/src/clistmenus.cpp
+++ b/plugins/Clist_mw/src/clistmenus.cpp
@@ -40,7 +40,7 @@ void DestroyTrayMenu(HMENU hMenu)
INT_PTR CloseAction(WPARAM wParam,LPARAM lParam)
{
- if ( CallService(MS_SYSTEM_OKTOEXIT,(WPARAM)0,(LPARAM)0))
+ if ( CallService(MS_SYSTEM_OKTOEXIT,0,0))
DestroyWindow(pcli->hwndContactList);
return 0;
diff --git a/plugins/Clist_mw/src/clistmod.cpp b/plugins/Clist_mw/src/clistmod.cpp
index ff096bb96c..35653a6553 100644
--- a/plugins/Clist_mw/src/clistmod.cpp
+++ b/plugins/Clist_mw/src/clistmod.cpp
@@ -64,7 +64,7 @@ int cli_IconFromStatusMode(const char *szProto,int nStatus, HANDLE hContact)
_snprintf(AdvancedService,sizeof(AdvancedService),"%s%s",szActProto,"/GetAdvancedStatusIcon");
if (ServiceExists(AdvancedService))
- result = CallService(AdvancedService,(WPARAM)hActContact, (LPARAM)0);
+ result = CallService(AdvancedService,(WPARAM)hActContact, 0);
if (result == -1 || !(LOWORD(result)))
// result == -1 means no Advanced icon. LOWORD(result) == 0 happens when Advanced icon returned by ICQ (i.e. no transpot)
diff --git a/plugins/Clist_mw/src/clistopts.cpp b/plugins/Clist_mw/src/clistopts.cpp
index 2d9e657fb6..91c8cc155c 100644
--- a/plugins/Clist_mw/src/clistopts.cpp
+++ b/plugins/Clist_mw/src/clistopts.cpp
@@ -140,7 +140,7 @@ static INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP
DBGetContactSettingString(NULL,"CList","PrimaryStatus",&dbv);
ProtoEnumAccounts( &count, &accs );
item = SendDlgItemMessage(hwndDlg,IDC_PRIMARYSTATUS,CB_ADDSTRING,0,(LPARAM)TranslateT("Global"));
- SendDlgItemMessage(hwndDlg,IDC_PRIMARYSTATUS,CB_SETITEMDATA,item,(LPARAM)0);
+ SendDlgItemMessage(hwndDlg,IDC_PRIMARYSTATUS,CB_SETITEMDATA,item,0);
for ( i = 0; i < count; i++ ) {
if ( !IsAccountEnabled( accs[i] ) || CallProtoService( accs[i]->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0 ) == 0 )
continue;
diff --git a/plugins/Clist_mw/src/clisttray.cpp b/plugins/Clist_mw/src/clisttray.cpp
index d0e6e3ae93..10fadb3c92 100644
--- a/plugins/Clist_mw/src/clisttray.cpp
+++ b/plugins/Clist_mw/src/clisttray.cpp
@@ -43,7 +43,7 @@ INT_PTR TrayIconProcessMessage(WPARAM wParam,LPARAM lParam)
if (msg->lParam == WM_RBUTTONUP)
{
POINT pt;
- HMENU hMenu = (HMENU)CallService(MS_CLIST_MENUBUILDTRAY,(WPARAM)0,(LPARAM)0);
+ HMENU hMenu = (HMENU)CallService(MS_CLIST_MENUBUILDTRAY,0,0);
SetForegroundWindow(msg->hwnd);
SetFocus(msg->hwnd);
@@ -123,7 +123,7 @@ static INT_PTR AddTrayMenuItem(WPARAM wParam,LPARAM lParam)
op.Handle = (HANDLE)CallService(MO_ADDNEWMENUITEM,(WPARAM)hTrayMenuObject,(LPARAM)&tmi);
op.Setting = OPT_MENUITEMSETUNIQNAME;
op.Value = (INT_PTR)mi->pszService;
- CallService(MO_SETOPTIONSMENUITEM,(WPARAM)0,(LPARAM)&op);
+ CallService(MO_SETOPTIONSMENUITEM,0,(LPARAM)&op);
return (INT_PTR)op.Handle;
}
@@ -197,7 +197,7 @@ void InitTrayMenus(void)
tmp.CheckService = NULL;
tmp.ExecService = "CLISTMENUSTRAY/ExecService";
tmp.name = "TrayMenu";
- hTrayMenuObject = (HANDLE)CallService(MO_CREATENEWMENUOBJECT,(WPARAM)0,(LPARAM)&tmp);
+ hTrayMenuObject = (HANDLE)CallService(MO_CREATENEWMENUOBJECT,0,(LPARAM)&tmp);
CreateServiceFunction("CLISTMENUSTRAY/ExecService",TrayMenuExecService);
CreateServiceFunction("CLISTMENUSTRAY/FreeOwnerDataTrayMenu",FreeOwnerDataTrayMenu);
@@ -211,17 +211,17 @@ void InitTrayMenus(void)
op.Handle = hTrayMenuObject;
op.Setting = OPT_USERDEFINEDITEMS;
op.Value = TRUE;
- CallService(MO_SETOPTIONSMENUOBJECT,(WPARAM)0,(LPARAM)&op);
+ CallService(MO_SETOPTIONSMENUOBJECT,0,(LPARAM)&op);
op.Handle = hTrayMenuObject;
op.Setting = OPT_MENUOBJECT_SET_FREE_SERVICE;
op.Value = (INT_PTR)"CLISTMENUSTRAY/FreeOwnerDataTrayMenu";
- CallService(MO_SETOPTIONSMENUOBJECT,(WPARAM)0,(LPARAM)&op);
+ CallService(MO_SETOPTIONSMENUOBJECT,0,(LPARAM)&op);
op.Handle = hTrayMenuObject;
op.Setting = OPT_MENUOBJECT_SET_ONADD_SERVICE;
op.Value = (INT_PTR)"CLISTMENUSTRAY/TrayMenuonAddService";
- CallService(MO_SETOPTIONSMENUOBJECT,(WPARAM)0,(LPARAM)&op);
+ CallService(MO_SETOPTIONSMENUOBJECT,0,(LPARAM)&op);
{
//add exit command to menu
@@ -232,14 +232,14 @@ void InitTrayMenus(void)
mi.position = 900000;
mi.pszService = "CloseAction";
mi.pszName = LPGEN("E&xit");
- AddTrayMenuItem((WPARAM)0,(LPARAM)&mi);
+ AddTrayMenuItem(0,(LPARAM)&mi);
memset(&mi,0,sizeof(mi));
mi.cbSize = sizeof(mi);
mi.position = 100000;
mi.pszService = MS_CLIST_SHOWHIDE;
mi.pszName = LPGEN("&Hide/Show");
- hHideShowMainMenuItem = (HANDLE)AddTrayMenuItem((WPARAM)0,(LPARAM)&mi);
+ hHideShowMainMenuItem = (HANDLE)AddTrayMenuItem(0,(LPARAM)&mi);
memset(&mi,0,sizeof(mi));
mi.cbSize = sizeof(mi);
@@ -247,21 +247,21 @@ void InitTrayMenus(void)
mi.hIcon = LoadIcon(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_FINDUSER));
mi.pszService = "FindAdd/FindAddCommand";
mi.pszName = LPGEN("&Find/Add Contacts...");
- AddTrayMenuItem((WPARAM)0,(LPARAM)&mi);
+ AddTrayMenuItem(0,(LPARAM)&mi);
memset(&mi,0,sizeof(mi));
mi.cbSize = sizeof(mi);
mi.position = 300000;
mi.pszService = "";
mi.pszName = LPGEN("&Main Menu");
- hTrayMainMenuItemProxy = (HANDLE)AddTrayMenuItem((WPARAM)0,(LPARAM)&mi);
+ hTrayMainMenuItemProxy = (HANDLE)AddTrayMenuItem(0,(LPARAM)&mi);
memset(&mi,0,sizeof(mi));
mi.cbSize = sizeof(mi);
mi.position = 300100;
mi.pszService = "";
mi.pszName = LPGEN("&Status");
- hTrayStatusMenuItemProxy = (HANDLE)AddTrayMenuItem((WPARAM)0,(LPARAM)&mi);
+ hTrayStatusMenuItemProxy = (HANDLE)AddTrayMenuItem(0,(LPARAM)&mi);
memset(&mi,0,sizeof(mi));
mi.cbSize = sizeof(mi);
@@ -269,7 +269,7 @@ void InitTrayMenus(void)
mi.hIcon = LoadIcon(GetModuleHandle(NULL),MAKEINTRESOURCE(IDI_OPTIONS));
mi.pszService = "Options/OptionsCommand";
mi.pszName = LPGEN("&Options...");
- AddTrayMenuItem((WPARAM)0,(LPARAM)&mi);
+ AddTrayMenuItem(0,(LPARAM)&mi);
memset(&mi,0,sizeof(mi));
mi.cbSize = sizeof(mi);
@@ -277,5 +277,5 @@ void InitTrayMenus(void)
mi.hIcon = LoadIcon(GetModuleHandle(NULL),MAKEINTRESOURCE(IDI_CLIENTMIRANDA));
mi.pszService = "Help/AboutCommand";
mi.pszName = LPGEN("&About");
- AddTrayMenuItem((WPARAM)0,(LPARAM)&mi);
+ AddTrayMenuItem(0,(LPARAM)&mi);
} }
diff --git a/plugins/Clist_mw/src/clui.cpp b/plugins/Clist_mw/src/clui.cpp
index 77f55e5789..89a1d9dfd5 100644
--- a/plugins/Clist_mw/src/clui.cpp
+++ b/plugins/Clist_mw/src/clui.cpp
@@ -1,21 +1,21 @@
/*
Miranda IM: the free IM client for Microsoft* Windows*
-
- Copyright 2000-2003 Miranda ICQ/IM project,
- all portions of this codebase are copyrighted to the people
+
+ Copyright 2000-2003 Miranda ICQ/IM project,
+ all portions of this codebase are copyrighted to the people
listed in contributors.txt.
-
+
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -52,7 +52,7 @@ int n;
int TimerCreated;
} ProtoTicks,*pProtoTicks;
-ProtoTicks CycleStartTick[64];//max 64 protocols
+ProtoTicks CycleStartTick[64];//max 64 protocols
int CycleTimeInterval = 2000;
int CycleIconCount = 8;
@@ -103,8 +103,8 @@ static int CluiModulesLoaded(WPARAM wParam,LPARAM lParam)
CluiProtocolStatusChanged(0,0);
Sleep(0);
PostMessage(pcli->hwndContactList,M_CREATECLC,0,0);
-
- OnModulesLoadedCalled = TRUE;
+
+ OnModulesLoadedCalled = TRUE;
pcli->pfnInvalidateDisplayNameCacheEntry(INVALID_HANDLE_VALUE);
InitGroupMenus();
RegisterProtoIconsForAllProtoIconLib();
@@ -145,7 +145,7 @@ int GetConnectingIconForProtoCount(char *szProto)
str = strrchr(szPath,'\\');
if (str != NULL) *str = 0;
_snprintf(szFullPath, SIZEOF(szFullPath), "%s\\Icons\\proto_conn_%s.dll", szPath, szProto);
-
+
lstrcpynA(file,szFullPath,SIZEOF(file));
CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM)file, (LPARAM)fileFull);
ret = ExtractIconExA(fileFull,-1,NULL,NULL,1);
@@ -169,7 +169,7 @@ static HICON ExtractIconFromPath(const char *path)
if (comma == NULL) n = 0;
else {n = atoi(comma+1); *comma = 0;}
CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM)file, (LPARAM)fileFull);
-
+
#ifdef _DEBUG
{
// char buf[512];
@@ -201,7 +201,7 @@ HICON LoadIconFromExternalFile(char *filename,int i,boolean UseLibrary,boolean r
_snprintf(szFullPath, SIZEOF(szFullPath), "%s\\Icons\\%s,%d", szPath, filename, i);
}
- if (!UseLibrary) {
+ if (!UseLibrary) {
hIcon = ExtractIconFromPath(szFullPath);
if (hIcon) return hIcon;
}
@@ -218,12 +218,8 @@ HICON LoadIconFromExternalFile(char *filename,int i,boolean UseLibrary,boolean r
sid.hDefaultIcon = DefIcon;
Skin_AddIcon(&sid);
-
- char buf[256];
- sprintf(buf,"Registring Icon %s/%s hDefaultIcon: %p\r\n",SectName,IconName,DefIcon);
- OutputDebugStringA(buf);
}
- return ((HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)IconName));
+ return Skin_GetIcon(IconName);
}
return (HICON)0;
@@ -231,7 +227,7 @@ HICON LoadIconFromExternalFile(char *filename,int i,boolean UseLibrary,boolean r
void RegisterProtoIcons (char *protoname)
{
- if (ServiceExists(MS_SKIN2_GETICON)&&DBGetContactSettingByte(NULL,"CList","UseProtoIconFromIcoLib",1))
+ if ( DBGetContactSettingByte(NULL,"CList","UseProtoIconFromIcoLib",1))
{
int i;
char buf[256];
@@ -240,7 +236,7 @@ void RegisterProtoIcons (char *protoname)
{
sprintf(buf,"%s #%d",protoname,i);
sprintf(buf2,"Contact List/Connection Icons %s",protoname);
-
+
LoadIconFromExternalFile(NULL,i,TRUE,TRUE,buf,buf2,buf,0,GetConnectingIconForProto_DLL(protoname,i));
}
}
@@ -250,11 +246,11 @@ void RegisterProtoIconsForAllProtoIconLib()
{
int protoCount,i;
PROTOACCOUNT **accs;
-
+
ProtoEnumAccounts( &protoCount, &accs );
for ( i = 0; i < protoCount; i++ )
if ( IsAccountEnabled( accs[i] ) && CallProtoService( accs[i]->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0 ))
- RegisterProtoIcons( accs[i]->szModuleName );
+ RegisterProtoIcons( accs[i]->szModuleName );
}
HICON GetConnectingIconForProto_DLL(char *szProto,int b)
@@ -294,7 +290,7 @@ HICON GetConnectingIconForProto_DLL(char *szProto,int b)
HICON GetConnectingIconForProto(char *szProto,int b)
{
- if (ServiceExists(MS_SKIN2_GETICON)&&DBGetContactSettingByte(NULL,"CList","UseProtoIconFromIcoLib",1)) {
+ if ( DBGetContactSettingByte(NULL,"CList","UseProtoIconFromIcoLib",1)) {
HICON hIcon = 0;
char buf[256];
sprintf(buf,"%s #%d",szProto,b);
@@ -303,14 +299,14 @@ HICON GetConnectingIconForProto(char *szProto,int b)
if (hIcon == NULL) return (GetConnectingIconForProto_DLL(szProto,b));
return (CopyIcon(hIcon));
}
-
+
return GetConnectingIconForProto_DLL(szProto, b);
}
//wParam == szProto
INT_PTR GetConnectingIconService(WPARAM wParam,LPARAM lParam)
{
- int b;
+ int b;
ProtoTicks *pt = NULL;
HICON hIcon = NULL;
@@ -320,7 +316,7 @@ INT_PTR GetConnectingIconService(WPARAM wParam,LPARAM lParam)
pt = GetProtoTicksByProto(szProto);
if (pt != NULL) {
- if (pt->CycleStartTick != 0&&pt->IconsCount != 0) {
+ if (pt->CycleStartTick != 0&&pt->IconsCount != 0) {
b = ((GetTickCount()-pt->CycleStartTick)/(DefaultStep))%pt->IconsCount;
hIcon = GetConnectingIconForProto(szProto,b);
}
@@ -332,20 +328,20 @@ INT_PTR GetConnectingIconService(WPARAM wParam,LPARAM lParam)
int CreateTimerForConnectingIcon(WPARAM wParam,LPARAM lParam)
{
int status = (int)wParam;
- char *szProto = (char *)lParam;
+ char *szProto = (char *)lParam;
if (!szProto) return 0;
if (!status) return 0;
-
+
if (( DBGetContactSettingByte(NULL,"CLUI","UseConnectingIcon",1) == 1) && status >= ID_STATUS_CONNECTING && status <= ID_STATUS_CONNECTING + MAX_CONNECT_RETRIES) {
ProtoTicks *pt = NULL;
int cnt;
pt = GetProtoTicksByProto(szProto);
if (pt != NULL) {
- if (pt->CycleStartTick == 0) {
+ if (pt->CycleStartTick == 0) {
KillTimer(pcli->hwndContactList,TM_STATUSBARUPDATE+pt->n);
cnt = GetConnectingIconForProtoCount(szProto);
- if (ServiceExists(MS_SKIN2_GETICON)&&DBGetContactSettingByte(NULL,"Clist","UseProtoIconFromIcoLib",1))
+ if ( DBGetContactSettingByte(NULL,"Clist","UseProtoIconFromIcoLib",1))
cnt = 8;
if (cnt != 0) {
@@ -369,13 +365,13 @@ int OnSettingChanging(WPARAM wParam,LPARAM lParam)
DBCONTACTWRITESETTING *dbcws = (DBCONTACTWRITESETTING *)lParam;
if (wParam == 0) {
if ((dbcws->value.type == DBVT_BYTE)&&!strcmp(dbcws->szModule,"CLUI")) {
- if (!strcmp(dbcws->szSetting,"SBarShow")) {
- showOpts = dbcws->value.bVal;
+ if (!strcmp(dbcws->szSetting,"SBarShow")) {
+ showOpts = dbcws->value.bVal;
return 0;
}
}
}
- else {
+ else {
if (dbcws == NULL)
return 0;
@@ -384,25 +380,25 @@ int OnSettingChanging(WPARAM wParam,LPARAM lParam)
SetAllExtraIcons(pcli->hwndContactTree,(HANDLE)wParam);
return 0;
}
- if (dbcws->value.type == DBVT_ASCIIZ&&!strcmp(dbcws->szSetting,"Cellular")) {
+ if (dbcws->value.type == DBVT_ASCIIZ&&!strcmp(dbcws->szSetting,"Cellular")) {
SetAllExtraIcons(pcli->hwndContactTree,(HANDLE)wParam);
return 0;
}
if (dbcws->value.type == DBVT_ASCIIZ&&strstr(dbcws->szModule,"ICQ")) {
- if ( !strcmp(dbcws->szSetting, "MirVer")) {
+ if ( !strcmp(dbcws->szSetting, "MirVer")) {
SetAllExtraIcons(pcli->hwndContactTree,(HANDLE)wParam);
return 0;
}
}
-
+
if (dbcws->value.type == DBVT_ASCIIZ&&!strcmp(dbcws->szModule,"UserInfo")) {
- if ( !strcmp(dbcws->szSetting, "MyPhone0")) {
+ if ( !strcmp(dbcws->szSetting, "MyPhone0")) {
SetAllExtraIcons(pcli->hwndContactTree,(HANDLE)wParam);
return 0;
}
- if (!strcmp(dbcws->szSetting, "Mye-mail0")) {
- SetAllExtraIcons(pcli->hwndContactTree,(HANDLE)wParam);
+ if (!strcmp(dbcws->szSetting, "Mye-mail0")) {
+ SetAllExtraIcons(pcli->hwndContactTree,(HANDLE)wParam);
return 0;
}
}
@@ -430,7 +426,7 @@ HWND PreCreateCLC(HWND parent)
int CreateCLC(HWND parent)
{
Sleep(0);
- {
+ {
// create contact list frame
CLISTFrame Frame;
memset(&Frame,0,sizeof(Frame));
@@ -442,11 +438,11 @@ int CreateCLC(HWND parent)
Frame.Flags = F_VISIBLE|F_SHOWTB|F_SHOWTBTIP|F_TCHAR;
Frame.tname = _T("My Contacts");
Frame.TBtname = TranslateT("My Contacts");
- hFrameContactTree = (HWND)CallService(MS_CLIST_FRAMES_ADDFRAME,(WPARAM)&Frame,(LPARAM)0);
+ hFrameContactTree = (HWND)CallService(MS_CLIST_FRAMES_ADDFRAME,(WPARAM)&Frame,0);
//free(Frame.name);
- CallService(MS_CLIST_FRAMES_SETFRAMEOPTIONS,MAKEWPARAM(FO_TBTIPNAME,hFrameContactTree),(LPARAM)TranslateT("My Contacts"));
+ CallService(MS_CLIST_FRAMES_SETFRAMEOPTIONS,MAKEWPARAM(FO_TBTIPNAME,hFrameContactTree),(LPARAM)TranslateT("My Contacts"));
}
-
+
ReloadExtraIcons();
{
lastreqh = 0;
@@ -458,10 +454,10 @@ int CreateCLC(HWND parent)
if (state == SETTING_STATE_NORMAL) ShowWindow(pcli->hwndContactList, SW_SHOW);
else if (state == SETTING_STATE_MINIMIZED) ShowWindow(pcli->hwndContactList, SW_SHOWMINIMIZED);
}
-
+
lastreqh = 0;
disableautoupd = 0;
-
+
}
hSettingChangedHook = HookEvent(ME_DB_CONTACT_SETTINGCHANGED,OnSettingChanging);
return 0;
@@ -472,7 +468,7 @@ int GetStatsuBarProtoRect(HWND hwnd,char *szProto,RECT *rc)
int nParts,nPanel;
ProtocolData *PD;
int startoffset = DBGetContactSettingDword(NULL,"StatusBar","FirstIconOffset",0);
-
+
if (!UseOwnerDrawStatusBar) startoffset = 0;
nParts = SendMessage(hwnd,SB_GETPARTS,0,0);
@@ -480,10 +476,10 @@ int GetStatsuBarProtoRect(HWND hwnd,char *szProto,RECT *rc)
for (nPanel = 0;nPanel<nParts;nPanel++)
{
- PD = (ProtocolData *)SendMessage(pcli->hwndStatus,SB_GETTEXT,(WPARAM)nPanel,(LPARAM)0);
+ PD = (ProtocolData *)SendMessage(pcli->hwndStatus,SB_GETTEXT,(WPARAM)nPanel,0);
if ( PD == NULL )
return 0;
-
+
if (!strcmp(szProto,PD->RealName))
{
SendMessage(hwnd,SB_GETRECT,(WPARAM)nPanel,(LPARAM)rc);
@@ -498,15 +494,15 @@ int GetStatsuBarProtoRect(HWND hwnd,char *szProto,RECT *rc)
extern LRESULT ( CALLBACK *saveContactListWndProc )(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
LRESULT CALLBACK ContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
-{
+{
/*
This registers a window message with RegisterWindowMessage() and then waits for such a message,
if it gets it, it tries to open a file mapping object and then maps it to this process space,
it expects 256 bytes of data (incl. NULL) it will then write back the profile it is using the DB to fill in the answer.
-
- The caller is expected to create this mapping object and tell us the ID we need to open ours.
+
+ The caller is expected to create this mapping object and tell us the ID we need to open ours.
*/
-
+
if (msg == hMsgGetProfile && wParam != 0) { /* got IPC message */
HANDLE hMap;
char szName[MAX_PATH];
@@ -533,14 +529,14 @@ LRESULT CALLBACK ContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
case WM_CREATE:
TranslateMenu(GetMenu(hwnd));
DrawMenuBar(hwnd);
- showOpts = DBGetContactSettingByte(NULL,"CLUI","SBarShow",1);
+ showOpts = DBGetContactSettingByte(NULL,"CLUI","SBarShow",1);
//create the status wnd
- //pcli->hwndStatus == CreateStatusWindow(WS_CHILD | (DBGetContactSettingByte(NULL,"CLUI","ShowSBar",1)?WS_VISIBLE:0), "", hwnd, 0);
+ //pcli->hwndStatus == CreateStatusWindow(WS_CHILD | (DBGetContactSettingByte(NULL,"CLUI","ShowSBar",1)?WS_VISIBLE:0), "", hwnd, 0);
CluiProtocolStatusChanged(0,0);
-
+
hMsgGetProfile = RegisterWindowMessageA( "Miranda::GetProfile" ); // don't localise
-
+
if ( DBGetContactSettingByte( NULL, "CList", "Transparent", 0 )) {
SetWindowLongPtr(hwnd, GWL_EXSTYLE, GetWindowLongPtr(hwnd, GWL_EXSTYLE) | WS_EX_LAYERED);
if ( MySetLayeredWindowAttributes )
@@ -561,16 +557,16 @@ LRESULT CALLBACK ContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
RECT rc;
if ( wParam != SIZE_MINIMIZED ) {
if ( pcli->hwndContactList != NULL )
- CLUIFramesOnClistResize((WPARAM)hwnd,(LPARAM)0);
+ CLUIFramesOnClistResize((WPARAM)hwnd,0);
- GetWindowRect(hwnd, &rc);
+ GetWindowRect(hwnd, &rc);
if (!CallService(MS_CLIST_DOCKINGISDOCKED,0,0)) {
//if docked, dont remember pos (except for width)
DBWriteContactSettingDword(NULL,"CList","Height",(DWORD)(rc.bottom - rc.top));
DBWriteContactSettingDword(NULL,"CList","x",(DWORD)rc.left);
DBWriteContactSettingDword(NULL,"CList","y",(DWORD)rc.top);
}
- DBWriteContactSettingDword(NULL,"CList","Width",(DWORD)(rc.right - rc.left));
+ DBWriteContactSettingDword(NULL,"CList","Width",(DWORD)(rc.right - rc.left));
}
if ( wParam == SIZE_MINIMIZED ) {
if ( DBGetContactSettingByte(NULL,"CList","Min2Tray",SETTING_MIN2TRAY_DEFAULT )) {
@@ -581,11 +577,11 @@ LRESULT CALLBACK ContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
}
return 0;
}
-
+
case WM_SETFOCUS:
- {
+ {
boolean isfloating;
- if ( hFrameContactTree ) {
+ if ( hFrameContactTree ) {
isfloating = CallService(MS_CLIST_FRAMES_GETFRAMEOPTIONS,MAKEWPARAM(FO_FLOATING,hFrameContactTree),0);
if ( isfloating == FALSE)
SetFocus(pcli->hwndContactTree);
@@ -602,7 +598,7 @@ LRESULT CALLBACK ContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
if (pt->szProto != NULL&&pt->TimerCreated == 1) {
status = CallProtoService(pt->szProto,PS_GETSTATUS,0,0);
if (!(status>=ID_STATUS_CONNECTING&&status<=ID_STATUS_CONNECTING+MAX_CONNECT_RETRIES))
- {
+ {
pt->CycleStartTick = 0;
KillTimer(hwnd,TM_STATUSBARUPDATE+pt->n);
pt->TimerCreated = 0;
@@ -640,13 +636,13 @@ LRESULT CALLBACK ContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
if (wParam == VK_F5)
SendMessage(pcli->hwndContactTree,CLM_AUTOREBUILD,0,0);
return TRUE;
-
+
case WM_GETMINMAXINFO:
DefWindowProc(hwnd,msg,wParam,lParam);
((LPMINMAXINFO)lParam)->ptMinTrackSize.x = 18;
if (requr == 0){((LPMINMAXINFO)lParam)->ptMinTrackSize.y = CLUIFramesGetMinHeight();}
return 0;
-
+
//MSG FROM CHILD CONTROL
case WM_NOTIFY:
if (((LPNMHDR)lParam)->hwndFrom == pcli->hwndContactTree) {
@@ -689,9 +685,9 @@ LRESULT CALLBACK ContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
rcWindow.bottom = rcWindow.top+newHeight;
if (rcWindow.bottom>rcWorkArea.bottom) rcWindow.bottom = rcWorkArea.bottom;
}
-
+
if (requr == 0) {
- requr = 1;
+ requr = 1;
SetWindowPos(hwnd,0,rcWindow.left,rcWindow.top,rcWindow.right-rcWindow.left,rcWindow.bottom-rcWindow.top,SWP_NOZORDER|SWP_NOACTIVATE);
GetWindowRect(hwnd,&rcWindow);
requr = 0;
@@ -699,16 +695,16 @@ LRESULT CALLBACK ContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
return TRUE;
}
case NM_CLICK:
- {
+ {
NMCLISTCONTROL *nm = (NMCLISTCONTROL*)lParam;
DWORD hitFlags;
HANDLE hItem = (HANDLE)SendMessage(pcli->hwndContactTree,CLM_HITTEST,(WPARAM)&hitFlags,MAKELPARAM(nm->pt.x,nm->pt.y));
- if (hitFlags&CLCHT_ONITEMEXTRA) {
+ if (hitFlags&CLCHT_ONITEMEXTRA) {
if (!IsHContactGroup(hItem)&&!IsHContactInfo(hItem))
{
int extra;
- pClcCacheEntry pdnce;
+ pClcCacheEntry pdnce;
pdnce = (pClcCacheEntry)pcli->pfnGetCacheEntry(nm->hItem);
if (pdnce == NULL) return 0;
@@ -733,8 +729,8 @@ LRESULT CALLBACK ContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
if (email) {
sprintf(buf,"mailto:%s",email);
ShellExecuteA(hwnd,"open",buf,NULL,NULL,SW_SHOW);
- }
- }
+ }
+ }
if (nm->iColumn == w) {
char *homepage;
homepage = DBGetStringA(pdnce->hContact,pdnce->szProto, "Homepage");
@@ -767,19 +763,19 @@ LRESULT CALLBACK ContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
int startoffset = DBGetContactSettingDword(NULL,"StatusBar","FirstIconOffset",0);
int extraspace = DBGetContactSettingDword(NULL,"StatusBar","BkExtraSpace",0);
boolean UseOwnerDrawStatusBar = DBGetContactSettingByte(NULL,"CLUI","UseOwnerDrawStatusBar",0);
-
+
hMenu = (HMENU)CallService(MS_CLIST_MENUGETSTATUS,0,0);
nParts = SendMessage(pcli->hwndStatus,SB_GETPARTS,0,0);
-
+
if (nm->dwItemSpec == 0xFFFFFFFE) {
nPanel = nParts-1;
SendMessage(pcli->hwndStatus,SB_GETRECT,nPanel,(LPARAM)&rc);
if (nm->pt.x < rc.left) return FALSE;
- }
- else {
+ }
+ else {
if (!((startoffset) != 0&&UseOwnerDrawStatusBar))
- {
- nPanel = nm->dwItemSpec;
+ {
+ nPanel = nm->dwItemSpec;
SendMessage(pcli->hwndStatus,SB_GETRECT,nPanel,(LPARAM)&rc);
}
else {
@@ -793,7 +789,7 @@ LRESULT CALLBACK ContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
sectwidth = clrc.right/nParts;
for (nPanel = 0;nPanel<nParts;nPanel++) {
- PD = (ProtocolData *)SendMessage(pcli->hwndStatus,SB_GETTEXT,(WPARAM)nPanel,(LPARAM)0);
+ PD = (ProtocolData *)SendMessage(pcli->hwndStatus,SB_GETTEXT,(WPARAM)nPanel,0);
if (PD == NULL)
continue;
@@ -807,10 +803,10 @@ LRESULT CALLBACK ContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
} } }
totcount = DBGetContactSettingDword(0,"Protocols","ProtoCount",0);
- PD = (ProtocolData *)SendMessage(pcli->hwndStatus,SB_GETTEXT,(WPARAM)nPanel,(LPARAM)0);
+ PD = (ProtocolData *)SendMessage(pcli->hwndStatus,SB_GETTEXT,(WPARAM)nPanel,0);
if (PD == NULL){return 0;}
menuid = nPanel;
-
+
if (menuid<0){break;}
hMenu = (HMENU)CallService(MS_CLIST_MENUGETSTATUS,0,0);
{
@@ -819,9 +815,9 @@ LRESULT CALLBACK ContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
int mcnt = GetMenuItemCount(hMenu);
for (i = 0; i<mcnt; ++i) {
HMENU hMenus = GetSubMenu(hMenu, i);
- if (hMenus && cpnl++ == menuid) {
- hMenu = hMenus;
- break;
+ if (hMenus && cpnl++ == menuid) {
+ hMenu = hMenus;
+ break;
}
}
}
@@ -831,7 +827,7 @@ LRESULT CALLBACK ContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
OutputDebugStringA(buf);
}
- if (hMenu != NULL) {
+ if (hMenu != NULL) {
GetCursorPos(&pt);
TrackPopupMenu(hMenu,TPM_BOTTOMALIGN|TPM_LEFTALIGN,pt.x,pt.y,0,hwnd,NULL);
} }
@@ -843,19 +839,19 @@ LRESULT CALLBACK ContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
{
//saving state
int state = DBGetContactSettingByte(NULL,"CList","State",SETTING_STATE_NORMAL);
-
+
FreeProtocolData();
if ( hSettingChangedHook != 0 )
UnhookEvent(hSettingChangedHook);
-
+
if ( state == SETTING_STATE_NORMAL )
ShowWindow(hwnd,SW_HIDE);
- CallService(MS_CLIST_FRAMES_REMOVEFRAME,(WPARAM)hFrameContactTree,(LPARAM)0);
+ CallService(MS_CLIST_FRAMES_REMOVEFRAME,(WPARAM)hFrameContactTree,0);
DestroyWindow(pcli->hwndContactTree);
pcli->hwndContactList = NULL;
- UnLoadCLUIFramesModule();
+ UnLoadCLUIFramesModule();
DBWriteContactSettingByte(NULL,"CList","State",(BYTE)state);
PostQuitMessage(0);
}
@@ -900,7 +896,7 @@ int LoadCLUIModule(void)
PreCreateCLC(pcli->hwndContactList);
// create status bar frame
- CreateStatusBarhWnd(pcli->hwndContactList);
+ CreateStatusBarhWnd(pcli->hwndContactList);
{ //int state = DBGetContactSettingByte(NULL,"CList","State",SETTING_STATE_NORMAL);
hMenuMain = GetMenu(pcli->hwndContactList);
diff --git a/plugins/Clist_mw/src/cluiservices.cpp b/plugins/Clist_mw/src/cluiservices.cpp
index f75fbc9dac..38e19ee46d 100644
--- a/plugins/Clist_mw/src/cluiservices.cpp
+++ b/plugins/Clist_mw/src/cluiservices.cpp
@@ -34,9 +34,9 @@ void FreeProtocolData( void )
for (nPanel = 0;nPanel<nParts;nPanel++)
{
ProtocolData *PD;
- PD = (ProtocolData *)SendMessage(pcli->hwndStatus,SB_GETTEXT,(WPARAM)nPanel,(LPARAM)0);
+ PD = (ProtocolData *)SendMessage(pcli->hwndStatus,SB_GETTEXT,(WPARAM)nPanel,0);
if (PD != NULL && !IsBadCodePtr(( FARPROC )PD)) {
- SendMessage(pcli->hwndStatus,SB_SETTEXT,(WPARAM)nPanel|SBT_OWNERDRAW,(LPARAM)0);
+ SendMessage(pcli->hwndStatus,SB_SETTEXT,(WPARAM)nPanel|SBT_OWNERDRAW,0);
if (PD->RealName) mir_free(PD->RealName);
if (PD) mir_free(PD);
} } }
diff --git a/plugins/Clist_mw/src/groupmenu.cpp b/plugins/Clist_mw/src/groupmenu.cpp
index a92a2b4113..7053207a65 100644
--- a/plugins/Clist_mw/src/groupmenu.cpp
+++ b/plugins/Clist_mw/src/groupmenu.cpp
@@ -113,7 +113,7 @@ static INT_PTR AddGroupMenuItem(WPARAM wParam,LPARAM lParam)
op.Handle = (HANDLE)CallService(MO_ADDNEWMENUITEM,(WPARAM)hGroupMenuObject,(LPARAM)&tmi);
op.Setting = OPT_MENUITEMSETUNIQNAME;
op.Value = (INT_PTR)buf;
- CallService(MO_SETOPTIONSMENUITEM,(WPARAM)0,(LPARAM)&op);
+ CallService(MO_SETOPTIONSMENUITEM,0,(LPARAM)&op);
return (INT_PTR)op.Handle;
// mainItemCount++;
@@ -280,23 +280,23 @@ void InitGroupMenus(void)
tmp.CheckService = NULL;
tmp.ExecService = "CLISTMENUSGroup/ExecService";
tmp.name = "Group Menu";
- hGroupMenuObject = (HANDLE)CallService(MO_CREATENEWMENUOBJECT,(WPARAM)0,(LPARAM)&tmp);
+ hGroupMenuObject = (HANDLE)CallService(MO_CREATENEWMENUOBJECT,0,(LPARAM)&tmp);
op.Handle = hGroupMenuObject;
op.Setting = OPT_USERDEFINEDITEMS;
op.Value = TRUE;
- CallService(MO_SETOPTIONSMENUOBJECT,(WPARAM)0,(LPARAM)&op);
+ CallService(MO_SETOPTIONSMENUOBJECT,0,(LPARAM)&op);
op.Handle = hGroupMenuObject;
op.Setting = OPT_MENUOBJECT_SET_FREE_SERVICE;
op.Value = (INT_PTR)"CLISTMENUSGroup/FreeOwnerDataGroupMenu";
- CallService(MO_SETOPTIONSMENUOBJECT,(WPARAM)0,(LPARAM)&op);
+ CallService(MO_SETOPTIONSMENUOBJECT,0,(LPARAM)&op);
op.Handle = hGroupMenuObject;
op.Setting = OPT_MENUOBJECT_SET_ONADD_SERVICE;
op.Value = (INT_PTR)"CLISTMENUSGroup/GroupMenuonAddService";
- CallService(MO_SETOPTIONSMENUOBJECT,(WPARAM)0,(LPARAM)&op);
+ CallService(MO_SETOPTIONSMENUOBJECT,0,(LPARAM)&op);
{
//add exit command to menu
@@ -308,14 +308,14 @@ void InitGroupMenus(void)
mi.position = 1900000;
mi.pszService = "CloseAction";
mi.pszName = LPGEN("E&xit");
- AddGroupMenuItem((WPARAM)0,(LPARAM)&mi);
+ AddGroupMenuItem(0,(LPARAM)&mi);
memset(&mi,0,sizeof(mi));
mi.cbSize = sizeof(mi);
mi.position = 500;
mi.pszService = MS_CLIST_SHOWHIDE;
mi.pszName = LPGEN("&Hide/Show");
- hHideShowMainMenuItem = (HANDLE)AddGroupMenuItem((WPARAM)0,(LPARAM)&mi);
+ hHideShowMainMenuItem = (HANDLE)AddGroupMenuItem(0,(LPARAM)&mi);
memset(&mi,0,sizeof(mi));
mi.cbSize = sizeof(mi);
@@ -323,7 +323,7 @@ void InitGroupMenus(void)
mi.hIcon = LoadIcon(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_FINDUSER));
mi.pszService = "FindAdd/FindAddCommand";
mi.pszName = LPGEN("&Find/Add Contacts...");
- AddGroupMenuItem((WPARAM)0,(LPARAM)&mi);
+ AddGroupMenuItem(0,(LPARAM)&mi);
@@ -332,14 +332,14 @@ void InitGroupMenus(void)
mi.position = 300000;
mi.pszService = "";
mi.pszName = LPGEN("&Main Menu");
- hGroupMainMenuItemProxy = (HANDLE)AddGroupMenuItem((WPARAM)0,(LPARAM)&mi);
+ hGroupMainMenuItemProxy = (HANDLE)AddGroupMenuItem(0,(LPARAM)&mi);
memset(&mi,0,sizeof(mi));
mi.cbSize = sizeof(mi);
mi.position = 300100;
mi.pszService = "";
mi.pszName = LPGEN("&Status");
- hGroupStatusMenuItemProxy = (HANDLE)AddGroupMenuItem((WPARAM)0,(LPARAM)&mi);
+ hGroupStatusMenuItemProxy = (HANDLE)AddGroupMenuItem(0,(LPARAM)&mi);
memset(&mi,0,sizeof(mi));
mi.cbSize = sizeof(mi);
@@ -348,7 +348,7 @@ void InitGroupMenus(void)
mi.pszService = "Options/OptionsCommand";
mi.pszName = LPGEN("&Options...");
- AddGroupMenuItem((WPARAM)0,(LPARAM)&mi);
+ AddGroupMenuItem(0,(LPARAM)&mi);
memset(&mi,0,sizeof(mi));
@@ -358,7 +358,7 @@ void InitGroupMenus(void)
mi.pszService = "Help/AboutCommand";
mi.pszName = LPGEN("&About");
- //AddGroupMenuItem((WPARAM)0,(LPARAM)&mi);
+ //AddGroupMenuItem(0,(LPARAM)&mi);
memset(&mi,0,sizeof(mi));
mi.cbSize = sizeof(mi);
@@ -366,7 +366,7 @@ void InitGroupMenus(void)
mi.hIcon = ImageList_GetIcon(hCListImages,NewGroupIconidx,0);
mi.pszService = MS_CLIST_GROUPCREATE;
mi.pszName = LPGEN("&New Group");
- hNewGroupMenuItem = (HANDLE)AddGroupMenuItem((WPARAM)0,(LPARAM)&mi);
+ hNewGroupMenuItem = (HANDLE)AddGroupMenuItem(0,(LPARAM)&mi);
memset(&mi,0,sizeof(mi));
mi.cbSize = sizeof(mi);
@@ -383,7 +383,7 @@ void InitGroupMenus(void)
mi.hIcon = NULL;
mi.pszService = "CLISTMENUSGroup/HideOfflineRootHelper";
mi.pszName = LPGEN("Hide &Offline Users out here");
- hHideOfflineUsersOutHereMenuItem = (HANDLE)AddGroupMenuItem((WPARAM)0,(LPARAM)&mi);
+ hHideOfflineUsersOutHereMenuItem = (HANDLE)AddGroupMenuItem(0,(LPARAM)&mi);
memset(&mi,0,sizeof(mi));
@@ -392,7 +392,7 @@ void InitGroupMenus(void)
mi.hIcon = NULL;
mi.pszService = "CLISTMENUSGroup/HideGroupsHelper";
mi.pszName = LPGEN("Hide &Empty Groups");
- hHideEmptyGroupsMenuItem = (HANDLE)AddGroupMenuItem((WPARAM)0,(LPARAM)&mi);
+ hHideEmptyGroupsMenuItem = (HANDLE)AddGroupMenuItem(0,(LPARAM)&mi);
@@ -402,7 +402,7 @@ void InitGroupMenus(void)
mi.hIcon = NULL;
mi.pszService = "CLISTMENUSGroup/UseGroupsHelper";
mi.pszName = LPGEN("Disable &Groups");
- hDisableGroupsMenuItem = (HANDLE)AddGroupMenuItem((WPARAM)0,(LPARAM)&mi);
+ hDisableGroupsMenuItem = (HANDLE)AddGroupMenuItem(0,(LPARAM)&mi);
HookEvent(ME_SKIN2_ICONSCHANGED,OnIconLibIconChanged);
@@ -505,7 +505,7 @@ static INT_PTR AddSubGroupMenuItem(WPARAM wParam,LPARAM lParam)
op.Handle = (HANDLE)CallService(MO_ADDNEWMENUITEM,(WPARAM)hSubGroupMenuObject,(LPARAM)&tmi);
op.Setting = OPT_MENUITEMSETUNIQNAME;
op.Value = (INT_PTR)buf;
- CallService(MO_SETOPTIONSMENUITEM,(WPARAM)0,(LPARAM)&op);
+ CallService(MO_SETOPTIONSMENUITEM,0,(LPARAM)&op);
return (INT_PTR)op.Handle;
}
@@ -582,23 +582,23 @@ void InitSubGroupMenus(void)
tmp.CheckService = NULL;
tmp.ExecService = "CLISTMENUSSubGroup/ExecService";
tmp.name = "SubGroupMenu";
- hSubGroupMenuObject = (HANDLE)CallService(MO_CREATENEWMENUOBJECT,(WPARAM)0,(LPARAM)&tmp);
+ hSubGroupMenuObject = (HANDLE)CallService(MO_CREATENEWMENUOBJECT,0,(LPARAM)&tmp);
op.Handle = hSubGroupMenuObject;
op.Setting = OPT_USERDEFINEDITEMS;
op.Value = TRUE;
- CallService(MO_SETOPTIONSMENUOBJECT,(WPARAM)0,(LPARAM)&op);
+ CallService(MO_SETOPTIONSMENUOBJECT,0,(LPARAM)&op);
op.Handle = hSubGroupMenuObject;
op.Setting = OPT_MENUOBJECT_SET_FREE_SERVICE;
op.Value = (INT_PTR)"CLISTMENUSSubGroup/FreeOwnerDataSubGroupMenu";
- CallService(MO_SETOPTIONSMENUOBJECT,(WPARAM)0,(LPARAM)&op);
+ CallService(MO_SETOPTIONSMENUOBJECT,0,(LPARAM)&op);
op.Handle = hSubGroupMenuObject;
op.Setting = OPT_MENUOBJECT_SET_ONADD_SERVICE;
op.Value = (INT_PTR)"CLISTMENUSSubGroup/SubGroupMenuonAddService";
- CallService(MO_SETOPTIONSMENUOBJECT,(WPARAM)0,(LPARAM)&op);
+ CallService(MO_SETOPTIONSMENUOBJECT,0,(LPARAM)&op);
{
//add exit command to menu