diff options
author | George Hazan <george.hazan@gmail.com> | 2012-11-02 14:11:01 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-11-02 14:11:01 +0000 |
commit | 75b1ff75c42644eb36552762652e4b0c9ff071bc (patch) | |
tree | 238f026ef373d30a395846f38c302a81961b14ac /plugins/Clist_modern/src | |
parent | 2caba72d51b09368801f23dd8951d589ab4dc809 (diff) |
final switch to the typed icolib api
git-svn-id: http://svn.miranda-ng.org/main/trunk@2152 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_modern/src')
-rw-r--r-- | plugins/Clist_modern/src/modern_aniavatars.cpp | 2 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_clc.cpp | 16 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_clistmenus.cpp | 14 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_clisttray.cpp | 28 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_clui.cpp | 437 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_cluiframes.cpp | 12 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_extraimage.cpp | 2 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_groupmenu.cpp | 44 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_rowtemplateopt.cpp | 2 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_skineditor.cpp | 16 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_statusbar.cpp | 4 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_viewmodebar.cpp | 6 |
12 files changed, 291 insertions, 292 deletions
diff --git a/plugins/Clist_modern/src/modern_aniavatars.cpp b/plugins/Clist_modern/src/modern_aniavatars.cpp index 88611fa1d0..23776b5d6f 100644 --- a/plugins/Clist_modern/src/modern_aniavatars.cpp +++ b/plugins/Clist_modern/src/modern_aniavatars.cpp @@ -420,7 +420,7 @@ int AniAva_SetAvatarPos(HANDLE hContact, RECT * rc, int overlayIdx, BYTE bAlpha) api->bAlpha = bAlpha;
api->idxOverlay = overlayIdx;
api->rcPos = *rc;
- SendNotifyMessage(pai->hWindow, AAM_SETPOSITION, (WPARAM)0, (LPARAM) api);
+ SendNotifyMessage(pai->hWindow, AAM_SETPOSITION, 0, (LPARAM) api);
// the AAM_SETPOSITION is responsible to destroy memory under api
pai->bInvalidPos = FALSE;
pai->bToBeDeleted = FALSE;
diff --git a/plugins/Clist_modern/src/modern_clc.cpp b/plugins/Clist_modern/src/modern_clc.cpp index 346fa70f2c..6ce417eef9 100644 --- a/plugins/Clist_modern/src/modern_clc.cpp +++ b/plugins/Clist_modern/src/modern_clc.cpp @@ -168,16 +168,16 @@ static int clcHookIconsChanged(WPARAM wParam, LPARAM lParam) hAvatarOverlays = ImageList_Create(16,16,ILC_MASK|ILC_COLOR32,MAX_REGS(g_pAvatarOverlayIcons)*2,1);
for (i=0 ; i < MAX_REGS(g_pAvatarOverlayIcons) ; i++)
{
- HICON hIcon = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)g_pAvatarOverlayIcons[i].name);
+ HICON hIcon = Skin_GetIcon(g_pAvatarOverlayIcons[i].name);
g_pAvatarOverlayIcons[i].listID = ImageList_AddIcon(hAvatarOverlays,hIcon);
- CallService(MS_SKIN2_RELEASEICON, 0, (LPARAM)g_pAvatarOverlayIcons[i].name);
+ Skin_ReleaseIcon(g_pAvatarOverlayIcons[i].name);
- hIcon = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)g_pStatusOverlayIcons[i].name);
+ hIcon = Skin_GetIcon(g_pStatusOverlayIcons[i].name);
g_pStatusOverlayIcons[i].listID = ImageList_AddIcon(hAvatarOverlays,hIcon);
- CallService(MS_SKIN2_RELEASEICON, 0, (LPARAM)g_pStatusOverlayIcons[i].name);
+ Skin_ReleaseIcon(g_pStatusOverlayIcons[i].name);
}
- g_hListeningToIcon = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)"LISTENING_TO_ICON");
+ g_hListeningToIcon = Skin_GetIcon("LISTENING_TO_ICON");
pcli->pfnClcBroadcast( INTM_INVALIDATE,0,0);
AniAva_UpdateOptions();
@@ -1388,7 +1388,7 @@ static LRESULT clcOnLButtonUp(struct ClcData *dat, HWND hwnd, UINT msg, WPARAM w handle = (HANDLE)CallService(MS_MC_CONVERTTOMETA,(WPARAM)hdest,0);
if ( !handle) return 0;
- CallService(MS_MC_REMOVEFROMMETA,(WPARAM)0,(LPARAM)hcontact);
+ CallService(MS_MC_REMOVEFROMMETA,0,(LPARAM)hcontact);
CallService(MS_MC_ADDTOMETA,(WPARAM)hcontact,(LPARAM)handle);
}
}
@@ -1449,7 +1449,7 @@ static LRESULT clcOnLButtonUp(struct ClcData *dat, HWND hwnd, UINT msg, WPARAM w if ( !handle) return 0;
- CallService(MS_MC_REMOVEFROMMETA,(WPARAM)0,(LPARAM)hcontact);
+ CallService(MS_MC_REMOVEFROMMETA,0,(LPARAM)hcontact);
CallService(MS_MC_ADDTOMETA,(WPARAM)hcontact,(LPARAM)handle);
}
}
@@ -1497,7 +1497,7 @@ static LRESULT clcOnLButtonUp(struct ClcData *dat, HWND hwnd, UINT msg, WPARAM w if ( !handle) return 0;
- CallService(MS_MC_REMOVEFROMMETA,(WPARAM)0,(LPARAM)hcontact);
+ CallService(MS_MC_REMOVEFROMMETA,0,(LPARAM)hcontact);
CallService(MS_MC_ADDTOMETA,(WPARAM)hcontact,(LPARAM)handle);
}
}
diff --git a/plugins/Clist_modern/src/modern_clistmenus.cpp b/plugins/Clist_modern/src/modern_clistmenus.cpp index 01555535c5..ba4e787b02 100644 --- a/plugins/Clist_modern/src/modern_clistmenus.cpp +++ b/plugins/Clist_modern/src/modern_clistmenus.cpp @@ -36,7 +36,7 @@ INT_PTR CloseAction(WPARAM wParam,LPARAM lParam) int k;
g_CluiData.bSTATE = STATE_PREPEARETOEXIT; // workaround for avatar service and other wich destroys service on OK_TOEXIT
do
- { k = CallService(MS_SYSTEM_OKTOEXIT,(WPARAM)0,0);
+ { k = CallService(MS_SYSTEM_OKTOEXIT,0,0);
}
while (!k);
@@ -132,11 +132,12 @@ static int FAV_OnContactMenuBuild(WPARAM wParam,LPARAM lParam) op.Handle = hFavoriteContactMenu;
op.Setting = OPT_MENUITEMSETUNIQNAME;
op.Value = (INT_PTR)"ModernClistMenu_ContactRate";
- CallService(MO_SETOPTIONSMENUITEM,(WPARAM)0,(LPARAM)&op);
+ CallService(MO_SETOPTIONSMENUITEM,0,(LPARAM)&op);
}
- CallService(MS_SKIN2_RELEASEICON,(WPARAM)mi.hIcon,0);
- if (mi.hIcon && NeedFree) DestroyIcon(mi.hIcon);
+ Skin_ReleaseIcon(mi.hIcon);
+ if (mi.hIcon && NeedFree)
+ DestroyIcon(mi.hIcon);
mi.pszPopupName = (char*)hFavoriteContactMenu;
if ( !hFavoriteContactMenuItems) {
@@ -155,8 +156,9 @@ static int FAV_OnContactMenuBuild(WPARAM wParam,LPARAM lParam) CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM) hFavoriteContactMenuItems[i], (LPARAM)&mi);
}
else hFavoriteContactMenuItems[i] = Menu_AddContactMenuItem(&mi);
- CallService(MS_SKIN2_RELEASEICON,(WPARAM)mi.hIcon,0);
- if (mi.hIcon && NeedFree) DestroyIcon(mi.hIcon);
+ Skin_ReleaseIcon(mi.hIcon);
+ if (mi.hIcon && NeedFree)
+ DestroyIcon(mi.hIcon);
}
mi.hIcon = NULL;
diff --git a/plugins/Clist_modern/src/modern_clisttray.cpp b/plugins/Clist_modern/src/modern_clisttray.cpp index a93d9475fb..835dcbf101 100644 --- a/plugins/Clist_modern/src/modern_clisttray.cpp +++ b/plugins/Clist_modern/src/modern_clisttray.cpp @@ -435,7 +435,7 @@ INT_PTR cli_TrayIconProcessMessage(WPARAM wParam,LPARAM lParam) if ((GetAsyncKeyState(VK_CONTROL)&0x8000) && msg->lParam == WM_LBUTTONDOWN && !db_get_b(NULL,"CList","Tray1Click",SETTING_TRAY1CLICK_DEFAULT)) {
POINT pt;
HMENU hMenu;
- hMenu = (HMENU)CallService(MS_CLIST_MENUGETSTATUS,(WPARAM)0,0);
+ hMenu = (HMENU)CallService(MS_CLIST_MENUGETSTATUS,0,0);
g_mutex_bOnTrayRightClick = 1;
IS_WM_MOUSE_DOWN_IN_TRAY = 1;
SetForegroundWindow(msg->hwnd);
@@ -453,7 +453,7 @@ INT_PTR cli_TrayIconProcessMessage(WPARAM wParam,LPARAM lParam) else if (msg->lParam == WM_RBUTTONUP) {
POINT pt;
HMENU hMenu;
- hMenu = (HMENU)CallService(MS_CLIST_MENUBUILDTRAY,(WPARAM)0,0);
+ hMenu = (HMENU)CallService(MS_CLIST_MENUBUILDTRAY,0,0);
g_mutex_bOnTrayRightClick = 1;
SetForegroundWindow(msg->hwnd);
@@ -537,7 +537,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;
// mainItemCount++;
@@ -622,23 +622,23 @@ 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);
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
@@ -651,7 +651,7 @@ void InitTrayMenus(void) mi.pszName = LPGEN("E&xit");
mi.flags = CMIF_ICONFROMICOLIB;
mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_EXIT);
- AddTrayMenuItem((WPARAM)0,(LPARAM)&mi);
+ AddTrayMenuItem(0,(LPARAM)&mi);
DestroyIcon_protect(mi.hIcon);
memset(&mi,0,sizeof(mi));
@@ -661,7 +661,7 @@ void InitTrayMenus(void) mi.pszName = LPGEN("&Hide/Show");
mi.flags = CMIF_ICONFROMICOLIB;
mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_SHOWHIDE);
- hTrayHideShowMainMenuItem = (HANDLE)AddTrayMenuItem((WPARAM)0,(LPARAM)&mi);
+ hTrayHideShowMainMenuItem = (HANDLE)AddTrayMenuItem(0,(LPARAM)&mi);
DestroyIcon_protect(mi.hIcon);
memset(&mi,0,sizeof(mi));
@@ -671,7 +671,7 @@ void InitTrayMenus(void) mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_FINDUSER);
mi.pszService = "FindAdd/FindAddCommand";
mi.pszName = LPGEN("&Find/Add Contacts...");
- AddTrayMenuItem((WPARAM)0,(LPARAM)&mi);
+ AddTrayMenuItem(0,(LPARAM)&mi);
DestroyIcon_protect(mi.hIcon);
@@ -682,7 +682,7 @@ void InitTrayMenus(void) mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_MAINMENU); // eternity #004
mi.pszService = "FakeService_1";
mi.pszName = LPGEN("&Main Menu");
- hTrayMainMenuItemProxy = (HANDLE)AddTrayMenuItem((WPARAM)0,(LPARAM)&mi);
+ hTrayMainMenuItemProxy = (HANDLE)AddTrayMenuItem(0,(LPARAM)&mi);
DestroyIcon_protect(mi.hIcon); // eternity #004
memset(&mi,0,sizeof(mi));
@@ -692,7 +692,7 @@ void InitTrayMenus(void) mi.flags = CMIF_ICONFROMICOLIB; // eternity #004
mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_STATUS); // eternity #004
mi.pszName = LPGEN("&Status");
- hTrayStatusMenuItemProxy = (HANDLE)AddTrayMenuItem((WPARAM)0,(LPARAM)&mi);
+ hTrayStatusMenuItemProxy = (HANDLE)AddTrayMenuItem(0,(LPARAM)&mi);
DestroyIcon_protect(mi.hIcon); // eternity #004
memset(&mi,0,sizeof(mi));
@@ -702,7 +702,7 @@ void InitTrayMenus(void) mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_OPTIONS);
mi.pszService = "Options/OptionsCommand";
mi.pszName = LPGEN("&Options...");
- AddTrayMenuItem((WPARAM)0,(LPARAM)&mi);
+ AddTrayMenuItem(0,(LPARAM)&mi);
DestroyIcon_protect(mi.hIcon);
memset(&mi,0,sizeof(mi));
@@ -712,7 +712,7 @@ void InitTrayMenus(void) mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_MIRANDA);
mi.pszService = "Help/AboutCommand";
mi.pszName = LPGEN("&About");
- AddTrayMenuItem((WPARAM)0,(LPARAM)&mi);
+ AddTrayMenuItem(0,(LPARAM)&mi);
DestroyIcon_protect(mi.hIcon);
}
diff --git a/plugins/Clist_modern/src/modern_clui.cpp b/plugins/Clist_modern/src/modern_clui.cpp index b86d2431e9..de295b0214 100644 --- a/plugins/Clist_modern/src/modern_clui.cpp +++ b/plugins/Clist_modern/src/modern_clui.cpp @@ -2,8 +2,8 @@ Miranda IM: the free IM client for Microsoft* Windows*
-Copyright 2000-2008 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
+Copyright 2000-2008 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -58,7 +58,7 @@ BOOL CLUI::m_fMainMenuInited = FALSE; HWND CLUI::m_hWnd = NULL;
void CLUI::cliOnCreateClc(void)
-{
+{
STATIC_METHOD;
_ASSERT( m_pCLUI );
m_pCLUI->CreateCluiFrames();
@@ -79,8 +79,8 @@ int CLUI::OnEvent_ModulesLoaded(WPARAM wParam,LPARAM lParam) CLUIServices_ProtocolStatusChanged(0,0);
SleepEx(0,TRUE);
- g_flag_bOnModulesLoadedCalled = TRUE;
- ///pcli->pfnInvalidateDisplayNameCacheEntry(INVALID_HANDLE_VALUE);
+ g_flag_bOnModulesLoadedCalled = TRUE;
+ ///pcli->pfnInvalidateDisplayNameCacheEntry(INVALID_HANDLE_VALUE);
SendMessage(pcli->hwndContactList,UM_CREATECLC,0,0); //$$$
InitSkinHotKeys();
g_CluiData.bSTATE = STATE_NORMAL;
@@ -92,17 +92,17 @@ int CLUI::OnEvent_ModulesLoaded(WPARAM wParam,LPARAM lParam) int CLUI::OnEvent_FontReload(WPARAM wParam,LPARAM lParam)
{
STATIC_METHOD;
-
+
pcli->pfnClcBroadcast( INTM_RELOADOPTIONS, wParam, lParam );
g_CluiData.dwKeyColor = db_get_dw(NULL,"ModernSettings","KeyColor",(DWORD)SETTING_KEYCOLOR_DEFAULT);
CLUI__cliInvalidateRect( pcli->hwndContactList, 0, 0 );
-
+
return 0;
}
-int CLUI::OnEvent_ContactMenuPreBuild(WPARAM wParam, LPARAM lParam)
+int CLUI::OnEvent_ContactMenuPreBuild(WPARAM wParam, LPARAM lParam)
{
TCHAR cls[128];
HANDLE hItem;
@@ -173,7 +173,7 @@ INT_PTR CLUI::Service_ShowMainMenu(WPARAM wParam,LPARAM lParam) 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(hMenu,TPM_TOPALIGN|TPM_LEFTALIGN|TPM_LEFTBUTTON,pt.x,pt.y,0,pcli->hwndContactList,NULL);
return 0;
}
@@ -183,7 +183,7 @@ INT_PTR CLUI::Service_ShowStatusMenu(WPARAM wParam,LPARAM lParam) POINT pt;
hMenu = (HMENU)CallService(MS_CLIST_MENUGETSTATUS,0,0);
GetCursorPos(&pt);
- TrackPopupMenu(hMenu,TPM_TOPALIGN|TPM_LEFTALIGN|TPM_LEFTBUTTON,pt.x,pt.y,0,pcli->hwndContactList,NULL);
+ TrackPopupMenu(hMenu,TPM_TOPALIGN|TPM_LEFTALIGN|TPM_LEFTBUTTON,pt.x,pt.y,0,pcli->hwndContactList,NULL);
return 0;
}
@@ -225,9 +225,9 @@ HRESULT CLUI::CreateCluiFrames() CLUI_ChangeWindowMode();
- RegisterAvatarMenu();
+ RegisterAvatarMenu();
- CLUI_ReloadCLUIOptions();
+ CLUI_ReloadCLUIOptions();
CreateUIFrames();
@@ -260,7 +260,7 @@ m_hDwmapiDll( NULL ) nLastRequiredHeight = 0;
LoadCLUIFramesModule();
- ExtraImage_LoadModule();
+ ExtraImage_LoadModule();
g_CluiData.boldHideOffline = -1;
bOldHideOffline = db_get_b(NULL,"CList","HideOffline",SETTING_HIDEOFFLINE_DEFAULT);
@@ -332,7 +332,7 @@ HRESULT CLUI::RegisterAvatarMenu() }
HRESULT CLUI::CreateCLCWindow(const HWND hwndClui)
-{
+{
ClcWnd() = CreateWindow(CLISTCONTROL_CLASS,_T(""),
WS_CHILD|WS_CLIPCHILDREN|CLS_CONTACTLIST
|(db_get_b(NULL,"CList","UseGroups",SETTING_USEGROUPS_DEFAULT)?CLS_USEGROUPS:0)
@@ -349,7 +349,7 @@ HRESULT CLUI::CreateUIFrames() {
EventArea_Create(pcli->hwndContactList);
CreateViewModeFrame();
- pcli->hwndStatus = StatusBar_Create(pcli->hwndContactList);
+ pcli->hwndStatus = StatusBar_Create(pcli->hwndContactList);
return S_OK;
}
@@ -375,7 +375,7 @@ HRESULT CLUI::FillAlphaChannel( HDC hDC, RECT * prcParent, BYTE bAlpha) RECT rcBounds;
GetRgnBox(hRgn,&rcBounds);
- if ( IsRectEmpty(&rcBounds))
+ if ( IsRectEmpty(&rcBounds))
{
DeleteObject(hRgn);
return S_FALSE;
@@ -409,18 +409,18 @@ HRESULT CLUI::CreateCLC() hFrameContactTree = (HWND)CallService(MS_CLIST_FRAMES_ADDFRAME,(WPARAM)&Frame,0);
CallService(MS_SKINENG_REGISTERPAINTSUB,(WPARAM)Frame.hWnd,(LPARAM)CLCPaint::PaintCallbackProc);
- CallService(MS_CLIST_FRAMES_SETFRAMEOPTIONS,MAKEWPARAM(FO_TBTIPNAME,hFrameContactTree),(LPARAM)Translate("My Contacts"));
+ CallService(MS_CLIST_FRAMES_SETFRAMEOPTIONS,MAKEWPARAM(FO_TBTIPNAME,hFrameContactTree),(LPARAM)Translate("My Contacts"));
ExtraImage_ReloadExtraIcons();
nLastRequiredHeight = 0;
if ( g_CluiData.current_viewmode[0] == '\0' )
{
- if (bOldHideOffline != (BYTE)-1)
+ if (bOldHideOffline != (BYTE)-1)
CallService( MS_CLIST_SETHIDEOFFLINE,(WPARAM)bOldHideOffline, 0);
else
- CallService( MS_CLIST_SETHIDEOFFLINE,(WPARAM)0, 0);
- if (bOldUseGroups != (BYTE)-1)
+ CallService( MS_CLIST_SETHIDEOFFLINE,0, 0);
+ if (bOldUseGroups != (BYTE)-1)
CallService( MS_CLIST_SETUSEGROUPS ,(WPARAM)bOldUseGroups, 0);
else
CallService( MS_CLIST_SETUSEGROUPS ,(WPARAM)bOldUseGroups, 0);
@@ -433,7 +433,7 @@ HRESULT CLUI::CreateCLC() };
HRESULT CLUI::SnappingToEdge( WINDOWPOS * lpWindowPos )
-{
+{
//by ZORG
if ( MyMonitorFromWindow == NULL || MyGetMonitorInfo == NULL )
return S_FALSE;
@@ -500,20 +500,20 @@ BOOL CLUI_CheckOwnedByClui(HWND hWnd) return FALSE;
}
-int CLUI_ShowWindowMod(HWND hWnd, int nCmd)
+int CLUI_ShowWindowMod(HWND hWnd, int nCmd)
{
int res = 0;
if (hWnd == pcli->hwndContactList && (nCmd == SW_HIDE || nCmd == SW_MINIMIZE))
- {
+ {
AniAva_InvalidateAvatarPositions(NULL);
AniAva_RemoveInvalidatedAvatars();
}
- if (hWnd == pcli->hwndContactList
+ if (hWnd == pcli->hwndContactList
&& !g_mutex_bChangingMode
- && nCmd == SW_HIDE
- && !g_CluiData.fLayered
+ && nCmd == SW_HIDE
+ && !g_CluiData.fLayered
&& IsWinVerXPPlus()
&& db_get_b(NULL,"CList","WindowShadow",SETTING_WINDOWSHADOW_DEFAULT))
{
@@ -523,12 +523,12 @@ int CLUI_ShowWindowMod(HWND hWnd, int nCmd) if (hWnd == pcli->hwndContactList
&& !g_mutex_bChangingMode
&& nCmd == SW_RESTORE
- && !g_CluiData.fLayered
- && IsWinVerXPPlus()
+ && !g_CluiData.fLayered
+ && IsWinVerXPPlus()
&& g_CluiData.fSmoothAnimation
- && !g_bTransparentFlag
- )
- {
+ && !g_bTransparentFlag
+ )
+ {
if (db_get_b(NULL,"CList","WindowShadow",SETTING_WINDOWSHADOW_DEFAULT))
{
CLUI_SmoothAlphaTransition(hWnd, 255, 1);
@@ -550,12 +550,12 @@ static BOOL CLUI_WaitThreadsCompletion(HWND hwnd) static const BYTE bcMAX_AWAITING_RETRY = 10; //repeat awaiting only 10 times
TRACE("CLUI_WaitThreadsCompletion Enter");
if (bEntersCount < bcMAX_AWAITING_RETRY
- && ( g_mutex_nCalcRowHeightLock ||
- g_CluiData.mutexPaintLock ||
- g_dwAwayMsgThreadID ||
- g_dwGetTextAsyncThreadID ||
- g_dwSmoothAnimationThreadID ||
- g_dwFillFontListThreadID)
+ && ( g_mutex_nCalcRowHeightLock ||
+ g_CluiData.mutexPaintLock ||
+ g_dwAwayMsgThreadID ||
+ g_dwGetTextAsyncThreadID ||
+ g_dwSmoothAnimationThreadID ||
+ g_dwFillFontListThreadID)
&& !Miranda_Terminated())
{
TRACE("Waiting threads");
@@ -574,7 +574,7 @@ static BOOL CLUI_WaitThreadsCompletion(HWND hwnd) }
void CLUI_UpdateLayeredMode()
-{
+{
g_CluiData.fDisableSkinEngine = db_get_b(NULL,"ModernData","DisableEngine", SETTING_DISABLESKIN_DEFAULT);
if (IsWinVer2000Plus())
{
@@ -588,16 +588,16 @@ void CLUI_UpdateLayeredMode() if (fWasVisible) ShowWindow(pcli->hwndContactList,SW_HIDE);
//change layered mode
exStyle = GetWindowLongPtr(pcli->hwndContactList,GWL_EXSTYLE);
- if (tLayeredFlag)
+ if (tLayeredFlag)
exStyle |= WS_EX_LAYERED;
else
exStyle &= ~WS_EX_LAYERED;
SetWindowLongPtr(pcli->hwndContactList,GWL_EXSTYLE,exStyle&~WS_EX_LAYERED);
SetWindowLongPtr(pcli->hwndContactList,GWL_EXSTYLE,exStyle);
g_CluiData.fLayered = tLayeredFlag;
- Sync(CLUIFrames_SetLayeredMode, tLayeredFlag,pcli->hwndContactList);
+ Sync(CLUIFrames_SetLayeredMode, tLayeredFlag,pcli->hwndContactList);
CLUI_ChangeWindowMode();
- Sync(CLUIFrames_OnClistResize_mod, (WPARAM)0, 0 );
+ Sync(CLUIFrames_OnClistResize_mod, 0, 0 );
if (fWasVisible) ShowWindow(pcli->hwndContactList,SW_SHOW);
}
}
@@ -607,7 +607,7 @@ void CLUI_UpdateAeroGlass() {
BOOL tAeroGlass = db_get_b(NULL, "ModernData", "AeroGlass", SETTING_AEROGLASS_DEFAULT) && (g_CluiData.fLayered);
if (g_proc_DWMEnableBlurBehindWindow && (tAeroGlass != g_CluiData.fAeroGlass))
- {
+ {
if (g_CluiData.hAeroGlassRgn)
{
DeleteObject(g_CluiData.hAeroGlassRgn);
@@ -657,7 +657,7 @@ void CLUI_ChangeWindowMode() style = WS_CLIPCHILDREN| (db_get_b(NULL,"CList","ThinBorder",SETTING_THINBORDER_DEFAULT)?WS_BORDER:0);
styleEx = WS_EX_TOOLWINDOW;
styleMaskEx |= WS_EX_APPWINDOW;
- }
+ }
else if (db_get_b(NULL,"CLUI","ShowCaption",SETTING_SHOWCAPTION_DEFAULT) && db_get_b(NULL,"CList","ToolWindow",SETTING_TOOLWINDOW_DEFAULT))
{
styleEx = WS_EX_TOOLWINDOW/*|WS_EX_WINDOWEDGE*/;
@@ -668,14 +668,14 @@ void CLUI_ChangeWindowMode() {
style = WS_CAPTION|WS_SYSMENU|WS_POPUPWINDOW|WS_CLIPCHILDREN|WS_THICKFRAME|WS_MINIMIZEBOX;
}
- else
+ else
{
style = WS_POPUPWINDOW|WS_CLIPCHILDREN|WS_THICKFRAME;
styleEx = WS_EX_TOOLWINDOW/*|WS_EX_WINDOWEDGE*/;
styleMaskEx |= WS_EX_APPWINDOW;
}
}
- else
+ else
{
style = WS_CLIPCHILDREN;
styleEx = WS_EX_TOOLWINDOW;
@@ -691,7 +691,7 @@ void CLUI_ChangeWindowMode() DBVARIANT dbv = {0};
if (DBGetContactSettingTString(NULL,"CList","TitleText",&dbv))
lstrcpyn(titleText,_T(MIRANDANAME),SIZEOF(titleText));
- else
+ else
{
lstrcpyn(titleText,dbv.ptszVal,SIZEOF(titleText));
db_free(&dbv);
@@ -710,13 +710,13 @@ void CLUI_ChangeWindowMode() }
//5- TODO Apply Style
oldStyleEx = curStyleEx = GetWindowLongPtr(pcli->hwndContactList,GWL_EXSTYLE);
- oldStyle = curStyle = GetWindowLongPtr(pcli->hwndContactList,GWL_STYLE);
+ oldStyle = curStyle = GetWindowLongPtr(pcli->hwndContactList,GWL_STYLE);
curStyleEx = (curStyleEx & ~styleMaskEx) | styleEx;
curStyle = (curStyle & ~styleMask) | style;
if (oldStyleEx != curStyleEx || oldStyle != curStyle)
{
- if (IsWindowVisible(pcli->hwndContactList))
+ if (IsWindowVisible(pcli->hwndContactList))
{
storedVisMode = TRUE;
mutex_bShowHideCalledFromAnimation = TRUE;
@@ -729,7 +729,7 @@ void CLUI_ChangeWindowMode() CLUI_UpdateAeroGlass();
- if (g_CluiData.fLayered || !db_get_b(NULL,"CLUI","ShowMainMenu",SETTING_SHOWMAINMENU_DEFAULT))
+ if (g_CluiData.fLayered || !db_get_b(NULL,"CLUI","ShowMainMenu",SETTING_SHOWMAINMENU_DEFAULT))
{
HMENU m = GetMenu(pcli->hwndContactList);
SetMenu(pcli->hwndContactList,NULL);
@@ -745,14 +745,14 @@ void CLUI_ChangeWindowMode() if (db_get_b(NULL,"CList","OnDesktop", SETTING_ONDESKTOP_DEFAULT))
{
HWND hProgMan = FindWindow(_T("Progman"),NULL);
- if (IsWindow(hProgMan))
+ if (IsWindow(hProgMan))
{
SetParent(pcli->hwndContactList,hProgMan);
Sync( CLUIFrames_SetParentForContainers, (HWND) hProgMan );
g_CluiData.fOnDesktop = 1;
}
- }
- else
+ }
+ else
{
// HWND parent = GetParent(pcli->hwndContactList);
// HWND progman = FindWindow(_T("Progman"),NULL);
@@ -765,7 +765,7 @@ void CLUI_ChangeWindowMode() }
//7- if it was visible - show
- if (storedVisMode)
+ if (storedVisMode)
{
ShowWindow(pcli->hwndContactList,SW_SHOW);
Sync(CLUIFrames_OnShowHide, pcli->hwndContactList,1);
@@ -786,15 +786,15 @@ void CLUI_ChangeWindowMode() h = (h < v)?h:v;
hRgn1 = CreateRoundRectRgn(0,0,(r.right-r.left+1),(r.bottom-r.top+1),h,h);
if ((db_get_b(NULL,"CLC","RoundCorners",SETTING_ROUNDCORNERS_DEFAULT)) && (!CallService(MS_CLIST_DOCKINGISDOCKED,0,0)))
- SetWindowRgn(pcli->hwndContactList,hRgn1,1);
- else
+ SetWindowRgn(pcli->hwndContactList,hRgn1,1);
+ else
{
DeleteObject(hRgn1);
SetWindowRgn(pcli->hwndContactList,NULL,1);
}
- RedrawWindow(pcli->hwndContactList,NULL,NULL,RDW_INVALIDATE|RDW_ERASE|RDW_FRAME|RDW_UPDATENOW|RDW_ALLCHILDREN);
- }
+ RedrawWindow(pcli->hwndContactList,NULL,NULL,RDW_INVALIDATE|RDW_ERASE|RDW_FRAME|RDW_UPDATENOW|RDW_ALLCHILDREN);
+ }
g_mutex_bChangingMode = FALSE;
flag_bFirstTimeCall = TRUE;
AniAva_UpdateParent();
@@ -802,8 +802,8 @@ void CLUI_ChangeWindowMode() struct _tagTimerAsync
{
HWND hwnd;
- int ID;
- int Timeout;
+ int ID;
+ int Timeout;
TIMERPROC proc;
};
static UINT_PTR SetTimerSync(WPARAM wParam , LPARAM lParam)
@@ -815,17 +815,17 @@ static UINT_PTR SetTimerSync(WPARAM wParam , LPARAM lParam) UINT_PTR CLUI_SafeSetTimer(HWND hwnd, int ID, int Timeout, TIMERPROC proc)
{
struct _tagTimerAsync param = { hwnd, ID, Timeout, proc };
- return Sync(SetTimerSync, (WPARAM) ¶m, (LPARAM) 0);
+ return Sync(SetTimerSync, (WPARAM) ¶m, (LPARAM) 0);
}
int CLUI_UpdateTimer(BYTE BringIn)
-{
+{
if (g_CluiData.nBehindEdgeState == 0)
{
KillTimer(pcli->hwndContactList,TM_BRINGOUTTIMEOUT);
CLUI_SafeSetTimer(pcli->hwndContactList,TM_BRINGOUTTIMEOUT,wBehindEdgeHideDelay*100,NULL);
}
- if (bShowEventStarted == 0 && g_CluiData.nBehindEdgeState>0 )
+ if (bShowEventStarted == 0 && g_CluiData.nBehindEdgeState>0 )
{
KillTimer(pcli->hwndContactList,TM_BRINGINTIMEOUT);
bShowEventStarted = (BOOL)CLUI_SafeSetTimer(pcli->hwndContactList,TM_BRINGINTIMEOUT,wBehindEdgeShowDelay*100,NULL);
@@ -845,7 +845,7 @@ int CLUI_HideBehindEdge() int bordersize = 0;
//Need to be moved out of screen
bShowEventStarted = 0;
- //1. get work area rectangle
+ //1. get work area rectangle
Docking_GetMonitorRectFromWindow(pcli->hwndContactList,&rcScreen);
//SystemParametersInfo(SPI_GETWORKAREA,0,&rcScreen,FALSE);
//2. move out
@@ -880,7 +880,7 @@ int CLUI_ShowFromBehindEdge() {
int method = g_CluiData.bBehindEdgeSettings;
bShowEventStarted = 0;
- if (g_mutex_bOnTrayRightClick)
+ if (g_mutex_bOnTrayRightClick)
{
g_mutex_bOnTrayRightClick = 0;
return 0;
@@ -892,7 +892,7 @@ int CLUI_ShowFromBehindEdge() int bordersize = 0;
//Need to be moved out of screen
- //1. get work area rectangle
+ //1. get work area rectangle
//SystemParametersInfo(SPI_GETWORKAREA,0,&rcScreen,FALSE);
Docking_GetMonitorRectFromWindow(pcli->hwndContactList,&rcScreen);
//2. move out
@@ -953,7 +953,7 @@ static LPPROTOTICKS CLUI_GetProtoTicksByProto(char * szProto) {
CycleStartTick[i].szProto = mir_strdup(szProto);
CycleStartTick[i].nCycleStartTick = 0;
- CycleStartTick[i].nIndex = i;
+ CycleStartTick[i].nIndex = i;
CycleStartTick[i].bGlobal = ( szProto[0] == 0 );
CycleStartTick[i].himlIconList = NULL;
return(&CycleStartTick[i]);
@@ -973,7 +973,7 @@ static int CLUI_GetConnectingIconForProtoCount(char *szAccoName) {
char szRelativePath[MAX_PATH];
GetModuleFileNameA(GetModuleHandle(NULL), szRelativePath, MAX_PATH);
- char *str = strrchr( szRelativePath, '\\' );
+ char *str = strrchr( szRelativePath, '\\' );
if ( str != NULL ) *str = 0;
CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM)szRelativePath, (LPARAM)szFolderPath);
}
@@ -1036,7 +1036,7 @@ HICON CLUI_LoadIconFromExternalFile(char *filename,int i,BOOL UseLibrary,bool re GetModuleFileNameA(g_hInst, szMyPath, MAX_PATH);
str = strrchr(szPath,'\\');
if (str != NULL) *str = 0;
- if (UseLibrary&2)
+ if (UseLibrary&2)
mir_snprintf(szMyPath, SIZEOF(szMyPath), "%s\\Icons\\%s", szPath, filename);
mir_snprintf(szFullPath, SIZEOF(szFullPath), "%s\\Icons\\%s,%d", szPath, filename, i);
if (str != NULL) *str = '\\';
@@ -1047,14 +1047,14 @@ HICON CLUI_LoadIconFromExternalFile(char *filename,int i,BOOL UseLibrary,bool re if (hi) has_proto_icon = TRUE;
if (hi && nf) DestroyIcon(hi);
}
- if ( !UseLibrary) {
+ if ( !UseLibrary) {
hIcon = CLUI_ExtractIconFromPath(szFullPath,needFree);
if (hIcon) return hIcon;
if (UseLibrary)
{
mir_snprintf(szFullPath, SIZEOF(szFullPath), "%s,%d", szMyPath, internalidx);
hIcon = CLUI_ExtractIconFromPath(szFullPath,needFree);
- if (hIcon) return hIcon;
+ if (hIcon) return hIcon;
}
}
else {
@@ -1062,7 +1062,7 @@ HICON CLUI_LoadIconFromExternalFile(char *filename,int i,BOOL UseLibrary,bool re sid.cbSize = sizeof(sid);
sid.cx = 16;
sid.cy = 16;
- sid.hDefaultIcon = (has_proto_icon || !(UseLibrary&2))?NULL:(HICON)CallService(MS_SKIN_LOADPROTOICON,(WPARAM)NULL,(LPARAM)(-internalidx));
+ sid.hDefaultIcon = (has_proto_icon || !(UseLibrary&2))?NULL:(HICON)CallService(MS_SKIN_LOADPROTOICON,0,(LPARAM)(-internalidx));
sid.pszSection = SectName;
sid.pszName = IconName;
sid.pszDescription = Description;
@@ -1071,12 +1071,9 @@ HICON CLUI_LoadIconFromExternalFile(char *filename,int i,BOOL UseLibrary,bool re sid.iDefaultIndex = (UseLibrary&2)?i:(internalidx < 0)?internalidx:-internalidx;
Skin_AddIcon(&sid);
}
- return ((HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)IconName));
+ return Skin_GetIcon(IconName);
}
-
-
-
return (HICON)0;
}
@@ -1086,7 +1083,7 @@ static HICON CLUI_GetConnectingIconForProto(char *szAccoName, int b) HICON hIcon = NULL;
BOOL needFree;
b = b-1;
-
+
if ( szAccoName )
{
mir_snprintf(szFullPath, SIZEOF(szFullPath), "proto_conn_%s.dll",szAccoName);
@@ -1117,7 +1114,7 @@ static HICON CLUI_GetConnectingIconForProto(char *szAccoName, int b) INT_PTR CLUI_GetConnectingIconService(WPARAM wParam,LPARAM lParam)
{
- int b;
+ int b;
PROTOTICKS *pt = NULL;
HICON hIcon = NULL;
@@ -1136,8 +1133,8 @@ INT_PTR CLUI_GetConnectingIconService(WPARAM wParam,LPARAM lParam) }
if (pt != NULL)
{
- if (pt->nCycleStartTick != 0 && pt->nIconsCount != 0)
- {
+ if (pt->nCycleStartTick != 0 && pt->nIconsCount != 0)
+ {
b = ((GetTickCount()-pt->nCycleStartTick)/(nAnimatedIconStep))%(pt->nIconsCount);
// if (lParam)
// hIcon = CLUI_GetConnectingIconForProto("Global",b);
@@ -1159,7 +1156,7 @@ static int CLUI_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);
@@ -1172,8 +1169,8 @@ static int CLUI_CreateTimerForConnectingIcon(WPARAM wParam,LPARAM lParam) pt = CLUI_GetProtoTicksByProto(szProto);
if (pt != NULL)
{
- if (pt->nCycleStartTick == 0)
- {
+ if (pt->nCycleStartTick == 0)
+ {
KillTimer(pcli->hwndContactList,TM_STATUSBARUPDATE+pt->nIndex);
cnt = CLUI_GetConnectingIconForProtoCount(szProto);
if (cnt != 0)
@@ -1200,7 +1197,7 @@ static int CLUI_CreateTimerForConnectingIcon(WPARAM wParam,LPARAM lParam) return 0;
}
-static BOOL CALLBACK BroadcastEnumChildProc(HWND hwndChild, LPARAM lParam)
+static BOOL CALLBACK BroadcastEnumChildProc(HWND hwndChild, LPARAM lParam)
{
MSG * pMsg = (MSG*)lParam;
SendNotifyMessage( hwndChild, pMsg->message, pMsg->wParam, pMsg->lParam );
@@ -1233,16 +1230,16 @@ int CLUI_ReloadCLUIOptions() //window borders
if (g_CluiData.fDisableSkinEngine) {
g_CluiData.LeftClientMargin = 0;
- g_CluiData.RightClientMargin = 0;
+ g_CluiData.RightClientMargin = 0;
g_CluiData.TopClientMargin = 0;
g_CluiData.BottomClientMargin = 0;
} else {
//window borders
g_CluiData.LeftClientMargin = (int)db_get_b(NULL,"CLUI","LeftClientMargin",SETTING_LEFTCLIENTMARIGN_DEFAULT);
- g_CluiData.RightClientMargin = (int)db_get_b(NULL,"CLUI","RightClientMargin",SETTING_RIGHTCLIENTMARIGN_DEFAULT);
+ g_CluiData.RightClientMargin = (int)db_get_b(NULL,"CLUI","RightClientMargin",SETTING_RIGHTCLIENTMARIGN_DEFAULT);
g_CluiData.TopClientMargin = (int)db_get_b(NULL,"CLUI","TopClientMargin",SETTING_TOPCLIENTMARIGN_DEFAULT);
g_CluiData.BottomClientMargin = (int)db_get_b(NULL,"CLUI","BottomClientMargin",SETTING_BOTTOMCLIENTMARIGN_DEFAULT);
- }
+ }
BroadCastMessageToChild(pcli->hwndContactList, WM_THEMECHANGED, 0, 0);
NotifyEventHooks(g_CluiData.hEventBkgrChanged, 0, 0);
@@ -1279,10 +1276,10 @@ static int CLUI_DrawMenuBackGround(HWND hwnd, HDC hdc, int item, int state) mbi.cbSize = sizeof(MENUBARINFO);
fnGetMenuBarInfo(hwnd,OBJID_MENU, 0, &mbi);
if ( !(mbi.rcBar.right-mbi.rcBar.left>0 && mbi.rcBar.bottom-mbi.rcBar.top>0)) return 1;
- r1 = mbi.rcBar;
+ r1 = mbi.rcBar;
r1.bottom += !db_get_b(NULL,"CLUI","LineUnderMenu",SETTING_LINEUNDERMENU_DEFAULT);
if (item < 1)
- {
+ {
treg = CreateRectRgn(mbi.rcBar.left,mbi.rcBar.top,mbi.rcBar.right,r1.bottom);
if (item == 0) //should remove item clips
{
@@ -1292,7 +1289,7 @@ static int CLUI_DrawMenuBackGround(HWND hwnd, HDC hdc, int item, int state) fnGetMenuBarInfo(hwnd,OBJID_MENU, t, &mbi);
treg2 = CreateRectRgn(mbi.rcBar.left,mbi.rcBar.top,mbi.rcBar.right,mbi.rcBar.bottom);
CombineRgn(treg,treg,treg2,RGN_DIFF);
- DeleteObject(treg2);
+ DeleteObject(treg2);
}
}
@@ -1307,10 +1304,10 @@ static int CLUI_DrawMenuBackGround(HWND hwnd, HDC hdc, int item, int state) r1.top -= ra.top;
r1.bottom -= ra.top;
r1.right -= ra.left;
- }
+ }
//SelectClipRgn(hdc,NULL);
SelectClipRgn(hdc,treg);
- DeleteObject(treg);
+ DeleteObject(treg);
{
RECT rc;
HWND hwnd = pcli->hwndContactList;
@@ -1349,12 +1346,12 @@ static int CLUI_DrawMenuBackGround(HWND hwnd, HDC hdc, int item, int state) switch(dat->MenuBmpUse&CLBM_TYPE) {
case CLB_STRETCH:
if (dat->MenuBmpUse&CLBF_PROPORTIONAL) {
- if (clRect.right-clRect.left*bmp.bmHeight < clRect.bottom-clRect.top*bmp.bmWidth)
+ if (clRect.right-clRect.left*bmp.bmHeight < clRect.bottom-clRect.top*bmp.bmWidth)
{
desth = clRect.bottom-clRect.top;
destw = desth*bmp.bmWidth/bmp.bmHeight;
}
- else
+ else
{
destw = clRect.right-clRect.left;
desth = destw*bmp.bmHeight/bmp.bmWidth;
@@ -1387,7 +1384,7 @@ static int CLUI_DrawMenuBackGround(HWND hwnd, HDC hdc, int item, int state) break;
default: //clb_topleft
destw = bmp.bmWidth;
- desth = bmp.bmHeight;
+ desth = bmp.bmHeight;
break;
}
if (desth && destw)
@@ -1398,15 +1395,15 @@ static int CLUI_DrawMenuBackGround(HWND hwnd, HDC hdc, int item, int state) SelectObject(hdcBmp,oldbm);
DeleteDC(hdcBmp);
- }
+ }
else
{
hbr = CreateSolidBrush(dat->MenuBkColor);
FillRect(hdc,&r1,hbr);
- DeleteObject(hbr);
+ DeleteObject(hbr);
}
- if (item != 0 && state&(ODS_SELECTED))
+ if (item != 0 && state&(ODS_SELECTED))
{
hbr = CreateSolidBrush(dat->MenuBkHiColor);
FillRect(hdc,&r1,hbr);
@@ -1484,12 +1481,12 @@ void CLUI_cli_LoadCluiGlobalOpts() if (tLayeredFlag)
{
if (db_get_b(NULL,"CList","WindowShadow",SETTING_WINDOWSHADOW_DEFAULT) == 1)
- db_set_b(NULL,"CList","WindowShadow",2);
+ db_set_b(NULL,"CList","WindowShadow",2);
}
else
{
if (db_get_b(NULL,"CList","WindowShadow",SETTING_WINDOWSHADOW_DEFAULT) == 2)
- db_set_b(NULL,"CList","WindowShadow",1);
+ db_set_b(NULL,"CList","WindowShadow",1);
}
corecli.pfnLoadCluiGlobalOpts();
}
@@ -1499,14 +1496,14 @@ int CLUI_TestCursorOnBorders() {
HWND hwnd = pcli->hwndContactList;
HCURSOR hCurs1 = NULL;
- RECT r;
+ RECT r;
POINT pt;
int k = 0, t = 0, fx,fy;
HWND hAux;
BOOL mouse_in_window = 0;
HWND gf = GetForegroundWindow();
GetCursorPos(&pt);
- hAux = WindowFromPoint(pt);
+ hAux = WindowFromPoint(pt);
if (CLUI_CheckOwnedByClui(hAux))
{
if (g_bTransparentFlag) {
@@ -1537,7 +1534,7 @@ int CLUI_TestCursorOnBorders() */
hAux = WindowFromPoint(pt);
- while(hAux != NULL)
+ while(hAux != NULL)
{
if (hAux == hwnd) {mouse_in_window = 1; break;}
hAux = GetParent(hAux);
@@ -1559,7 +1556,7 @@ int CLUI_TestCursorOnBorders() if (g_CluiData.nBehindEdgeState <= 0 && (!(db_get_b(NULL,"CLUI","LockSize",SETTING_LOCKSIZE_DEFAULT))))
switch(k)
{
- case 1:
+ case 1:
case 2:
if ( !g_CluiData.fDocked || (g_CluiData.fDocked == 2 && k == 1) || (g_CluiData.fDocked == 1 && k == 2)){hCurs1 = LoadCursor(NULL, IDC_SIZEWE); break;}
case 3: if ( !g_CluiData.fDocked) {hCurs1 = LoadCursor(NULL, IDC_SIZENS); break;}
@@ -1609,10 +1606,10 @@ int CLUI_SizingOnBorder(POINT pt, int PerformSize) if ( !(pt.x >= r.left && pt.x <= r.right && pt.y >= r.top && pt.y <= r.bottom)) sizeOnBorderFlag = SCF_NONE;
- if (sizeOnBorderFlag && PerformSize)
- {
+ if (sizeOnBorderFlag && PerformSize)
+ {
ReleaseCapture();
- SendMessage(hwnd, WM_SYSCOMMAND, SC_SIZE + sizeOnBorderFlag,MAKELPARAM(pt.x,pt.y));
+ SendMessage(hwnd, WM_SYSCOMMAND, SC_SIZE + sizeOnBorderFlag,MAKELPARAM(pt.x,pt.y));
return sizeOnBorderFlag;
}
else return sizeOnBorderFlag;
@@ -1623,7 +1620,7 @@ int CLUI_SyncSmoothAnimation(WPARAM wParam, LPARAM lParam); static void CLUI_SmoothAnimationThreadProc(HWND hwnd)
{
// return;
- if ( !mutex_bAnimationInProgress)
+ if ( !mutex_bAnimationInProgress)
{
g_dwSmoothAnimationThreadID = 0;
return; /// Should be some locked to avoid painting against contact deletion.
@@ -1633,9 +1630,9 @@ static void CLUI_SmoothAnimationThreadProc(HWND hwnd) if ( !g_mutex_bLockUpdating)
{
if ( !MirandaExiting())
- Sync(CLUI_SyncSmoothAnimation, (WPARAM)0, (LPARAM)hwnd );
+ Sync(CLUI_SyncSmoothAnimation, 0, (LPARAM)hwnd );
SleepEx(20,TRUE);
- if (MirandaExiting())
+ if (MirandaExiting())
{
g_dwSmoothAnimationThreadID = 0;
return;
@@ -1660,25 +1657,25 @@ static int CLUI_SmoothAlphaThreadTransition(HWND hwnd) mutex_bAnimationInProgress = 0;
g_CluiData.bCurrentAlpha = bAlphaEnd;
if (g_CluiData.bCurrentAlpha == 0)
- {
+ {
g_CluiData.bCurrentAlpha = 1;
ske_JustUpdateWindowImage();
- mutex_bShowHideCalledFromAnimation = 1;
+ mutex_bShowHideCalledFromAnimation = 1;
CLUI_ShowWindowMod(pcli->hwndContactList,0);
Sync(CLUIFrames_OnShowHide, hwnd,0);
mutex_bShowHideCalledFromAnimation = 0;
g_CluiData.bCurrentAlpha = 0;
if ( !g_CluiData.fLayered) RedrawWindow(pcli->hwndContactList,NULL,NULL,RDW_ERASE|RDW_FRAME);
- return 0;
+ return 0;
}
}
- else g_CluiData.bCurrentAlpha = a;
- ske_JustUpdateWindowImage();
+ else g_CluiData.bCurrentAlpha = a;
+ ske_JustUpdateWindowImage();
return 1;
}
int CLUI_SmoothAlphaTransition(HWND hwnd, BYTE GoalAlpha, BOOL wParam)
-{
+{
if ((!g_CluiData.fLayered
&& (!g_CluiData.fSmoothAnimation && !g_bTransparentFlag)) || !g_proc_SetLayeredWindowAttributesNew)
@@ -1721,14 +1718,14 @@ int CLUI_SmoothAlphaTransition(HWND hwnd, BYTE GoalAlpha, BOOL wParam) }
if (mutex_bShowHideCalledFromAnimation) return 0;
if (wParam != 2) //not from timer
- {
+ {
bAlphaEnd = GoalAlpha;
if ( !mutex_bAnimationInProgress)
{
if ((!IsWindowVisible(hwnd) || g_CluiData.bCurrentAlpha == 0) && bAlphaEnd>0 )
{
- mutex_bShowHideCalledFromAnimation = 1;
- CLUI_ShowWindowMod(pcli->hwndContactList,SW_SHOWNA);
+ mutex_bShowHideCalledFromAnimation = 1;
+ CLUI_ShowWindowMod(pcli->hwndContactList,SW_SHOWNA);
Sync(CLUIFrames_OnShowHide, hwnd,SW_SHOW);
mutex_bShowHideCalledFromAnimation = 0;
g_CluiData.bCurrentAlpha = 1;
@@ -1738,7 +1735,7 @@ int CLUI_SmoothAlphaTransition(HWND hwnd, BYTE GoalAlpha, BOOL wParam) {
mutex_bAnimationInProgress = 1;
if (g_CluiData.fSmoothAnimation)
- g_dwSmoothAnimationThreadID = (DWORD)mir_forkthread((pThreadFunc)CLUI_SmoothAnimationThreadProc,pcli->hwndContactList);
+ g_dwSmoothAnimationThreadID = (DWORD)mir_forkthread((pThreadFunc)CLUI_SmoothAnimationThreadProc,pcli->hwndContactList);
}
}
@@ -1753,11 +1750,11 @@ int CLUI_SmoothAlphaTransition(HWND hwnd, BYTE GoalAlpha, BOOL wParam) {
KillTimer(hwnd,TM_SMOTHALPHATRANSITION);
mutex_bAnimationInProgress = 0;
- if (bAlphaEnd == 0)
+ if (bAlphaEnd == 0)
{
g_CluiData.bCurrentAlpha = 1;
ske_UpdateWindowImage();
- mutex_bShowHideCalledFromAnimation = 1;
+ mutex_bShowHideCalledFromAnimation = 1;
CLUI_ShowWindowMod(pcli->hwndContactList,0);
Sync(CLUIFrames_OnShowHide, pcli->hwndContactList,0);
mutex_bShowHideCalledFromAnimation = 0;
@@ -1793,7 +1790,7 @@ BOOL CLUI__cliInvalidateRect(HWND hWnd, CONST RECT* lpRect,BOOL bErase ) return 0;
}
}
- else
+ else
return InvalidateRect(hWnd,lpRect,bErase);
return 1;
}
@@ -1823,7 +1820,7 @@ HANDLE RegisterIcolibIconHandle(char * szIcoID, char *szSectionName, char * szD if (tszDefaultFile)
{
CallService( MS_UTILS_PATHTOABSOLUTET, ( WPARAM )tszDefaultFile, ( LPARAM )fileFull );
- if ( !FileExists(fileFull)) fileFull[0] = _T('\0');
+ if ( !FileExists(fileFull)) fileFull[0] = _T('\0');
}
if (fileFull[0] != _T('\0'))
{
@@ -1839,7 +1836,7 @@ HANDLE RegisterIcolibIconHandle(char * szIcoID, char *szSectionName, char * szD }
hIcolibItem = Skin_AddIcon(&sid);
if ( sid.hDefaultIcon ) DestroyIcon(sid.hDefaultIcon);
- return hIcolibItem;
+ return hIcolibItem;
}
// MAIN WINPROC MESSAGE HANDLERS
@@ -1858,7 +1855,7 @@ LRESULT CLUI::PreProcessWndProc( UINT msg, WPARAM wParam, LPARAM lParam, BOOL& b 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 (g_CluiData.bSTATE == STATE_EXITING && msg != WM_DESTROY)
{
@@ -1866,17 +1863,17 @@ LRESULT CLUI::PreProcessWndProc( UINT msg, WPARAM wParam, LPARAM lParam, BOOL& b return 0;
}
if (msg == uMsgGetProfile && wParam != 0) /* got IPC message */
- {
+ {
HANDLE hMap;
char szName[MAX_PATH];
int rc = 0;
mir_snprintf( szName, SIZEOF(szName), "Miranda::%u", wParam ); // caller will tell us the ID of the map
hMap = OpenFileMappingA( FILE_MAP_ALL_ACCESS,FALSE, szName );
- if ( hMap != NULL )
+ if ( hMap != NULL )
{
void *hView = NULL;
hView = MapViewOfFile( hMap, FILE_MAP_ALL_ACCESS, 0, 0, MAX_PATH );
- if (hView)
+ if (hView)
{
char szFilePath[MAX_PATH], szProfile[MAX_PATH];
CallService( MS_DB_GETPROFILEPATH,MAX_PATH,(LPARAM)&szFilePath );
@@ -1905,7 +1902,7 @@ LRESULT CLUI::OnSizingMoving( UINT msg, WPARAM wParam, LPARAM lParam ) if (bNeedFixSizingRect && (rcCorrectSizeRect.bottom != 0 || rcCorrectSizeRect.top != 0))
{
if (wParam != WMSZ_BOTTOM) wp->bottom = rcCorrectSizeRect.bottom;
- if (wParam != WMSZ_TOP) wp->top = rcCorrectSizeRect.top;
+ if (wParam != WMSZ_TOP) wp->top = rcCorrectSizeRect.top;
}
bNeedFixSizingRect = 0;
rcSizingRect = *wp;
@@ -1924,13 +1921,13 @@ LRESULT CLUI::OnSizingMoving( UINT msg, WPARAM wParam, LPARAM lParam ) wp = (WINDOWPOS *)lParam;
GetWindowRect(m_hWnd,&rcOldWindowRect);
- // Прилипание к краям by ZorG
+ // Прилипание к краям by ZorG
CLUI::SnappingToEdge(wp);
if ((rcOldWindowRect.bottom-rcOldWindowRect.top != wp->cy || rcOldWindowRect.right-rcOldWindowRect.left != wp->cx) && !(wp->flags&SWP_NOSIZE))
{
- {
- if ( !(wp->flags&SWP_NOMOVE))
+ {
+ if ( !(wp->flags&SWP_NOMOVE))
{
rcNewWindowRect.left = wp->x;
rcNewWindowRect.top = wp->y;
@@ -1940,7 +1937,7 @@ LRESULT CLUI::OnSizingMoving( UINT msg, WPARAM wParam, LPARAM lParam ) rcNewWindowRect.left = rcOldWindowRect.left;
rcNewWindowRect.top = rcOldWindowRect.top;
}
- rcNewWindowRect.right = rcNewWindowRect.left+wp->cx;
+ rcNewWindowRect.right = rcNewWindowRect.left+wp->cx;
rcNewWindowRect.bottom = rcNewWindowRect.top+wp->cy;
work_rect = rcNewWindowRect;
}
@@ -1967,13 +1964,13 @@ LRESULT CLUI::OnSizingMoving( UINT msg, WPARAM wParam, LPARAM lParam ) {
ModernSkinButton_ReposButtons( m_hWnd, SBRF_DO_NOT_DRAW, &work_rect );
ske_PrepeareImageButDontUpdateIt(&work_rect);
- g_CluiData.mutexPreventDockMoving = 0;
- ske_UpdateWindowImageRect(&work_rect);
+ g_CluiData.mutexPreventDockMoving = 0;
+ ske_UpdateWindowImageRect(&work_rect);
EndDeferWindowPos(PosBatch);
g_CluiData.mutexPreventDockMoving = 1;
- }
- Sleep(0);
- mutex_bDuringSizing = 0;
+ }
+ Sleep(0);
+ mutex_bDuringSizing = 0;
DefWindowProc(m_hWnd,msg,wParam,lParam);
return SendMessage(m_hWnd,WM_WINDOWPOSCHANGED,wParam,lParam);
}
@@ -1982,17 +1979,17 @@ LRESULT CLUI::OnSizingMoving( UINT msg, WPARAM wParam, LPARAM lParam ) SetRect(&rcCorrectSizeRect,0,0,0,0);
// bNeedFixSizingRect = 0;
}
- return DefWindowProc(m_hWnd,msg,wParam,lParam);
- }
+ return DefWindowProc(m_hWnd,msg,wParam,lParam);
+ }
}
else if (msg == WM_WINDOWPOSCHANGING)
{
- // Snaping if it is not in LayeredMode
+ // Snaping if it is not in LayeredMode
WINDOWPOS * wp;
wp = (WINDOWPOS *)lParam;
CLUI::SnappingToEdge( wp );
- return DefWindowProc(m_hWnd,msg,wParam,lParam);
+ return DefWindowProc(m_hWnd,msg,wParam,lParam);
}
switch (msg)
{
@@ -2016,7 +2013,7 @@ LRESULT CLUI::OnSizingMoving( UINT msg, WPARAM wParam, LPARAM lParam ) {
RECT rc;
CallWindowProc(DefWindowProc, m_hWnd, msg, wParam, lParam);
- mutex_bDuringSizing = 0;
+ mutex_bDuringSizing = 0;
GetWindowRect(m_hWnd, &rc);
CheckFramesPos(&rc);
Sync(CLUIFrames_OnMoving,m_hWnd,&rc);
@@ -2031,11 +2028,11 @@ LRESULT CLUI::OnSizingMoving( UINT msg, WPARAM wParam, LPARAM lParam ) }
return TRUE;
}
- case WM_SIZE:
- {
+ case WM_SIZE:
+ {
RECT rc;
if (g_mutex_bSizing) return 0;
- if (wParam != SIZE_MINIMIZED /* && IsWindowVisible(m_hWnd)*/)
+ if (wParam != SIZE_MINIMIZED /* && IsWindowVisible(m_hWnd)*/)
{
if ( pcli->hwndContactList == NULL )
return 0;
@@ -2056,7 +2053,7 @@ LRESULT CLUI::OnSizingMoving( UINT msg, WPARAM wParam, LPARAM lParam ) Sync(CLUIFrames_OnClistResize_mod,(WPARAM)m_hWnd,(LPARAM)1);
CLUIFrames_ApplyNewSizes(2);
CLUIFrames_ApplyNewSizes(1);
- SendMessage(m_hWnd,CLN_LISTSIZECHANGE,0,0);
+ SendMessage(m_hWnd,CLN_LISTSIZECHANGE,0,0);
g_mutex_bSizing = 0;
}
@@ -2068,7 +2065,7 @@ LRESULT CLUI::OnSizingMoving( UINT msg, WPARAM wParam, LPARAM lParam ) db_set_dw(NULL,"CList","y",(DWORD)rc.top);
}
else SetWindowRgn(m_hWnd,NULL,0);
- db_set_dw(NULL,"CList","Width",(DWORD)(rc.right - rc.left));
+ db_set_dw(NULL,"CList","Width",(DWORD)(rc.right - rc.left));
if ( !g_CluiData.fLayered)
{
@@ -2082,14 +2079,14 @@ LRESULT CLUI::OnSizingMoving( UINT msg, WPARAM wParam, LPARAM lParam ) h = (h < v)?h:v;
hRgn1 = CreateRoundRectRgn(0,0,(r.right-r.left+1),(r.bottom-r.top+1),h,h);
if ((db_get_b(NULL,"CLC","RoundCorners",SETTING_ROUNDCORNERS_DEFAULT)) && (!CallService(MS_CLIST_DOCKINGISDOCKED,0,0)))
- SetWindowRgn(m_hWnd,hRgn1,FALSE);
+ SetWindowRgn(m_hWnd,hRgn1,FALSE);
else
{
DeleteObject(hRgn1);
SetWindowRgn(m_hWnd,NULL,FALSE);
}
- RedrawWindow(m_hWnd,NULL,NULL,RDW_INVALIDATE|RDW_ERASE|RDW_FRAME|RDW_UPDATENOW|RDW_ALLCHILDREN);
- }
+ RedrawWindow(m_hWnd,NULL,NULL,RDW_INVALIDATE|RDW_ERASE|RDW_FRAME|RDW_UPDATENOW|RDW_ALLCHILDREN);
+ }
}
else {
if (db_get_b(NULL,"CList","Min2Tray",SETTING_MIN2TRAY_DEFAULT)) {
@@ -2097,7 +2094,7 @@ LRESULT CLUI::OnSizingMoving( UINT msg, WPARAM wParam, LPARAM lParam ) db_set_b(NULL,"CList","State",SETTING_STATE_HIDDEN);
}
else db_set_b(NULL,"CList","State",SETTING_STATE_MINIMIZED);
- if (MySetProcessWorkingSetSize != NULL)
+ if (MySetProcessWorkingSetSize != NULL)
MySetProcessWorkingSetSize(GetCurrentProcess(),-1,-1);
}
@@ -2105,9 +2102,9 @@ LRESULT CLUI::OnSizingMoving( UINT msg, WPARAM wParam, LPARAM lParam ) }
case WM_WINDOWPOSCHANGING:
{
- WINDOWPOS *wp = (WINDOWPOS *)lParam;
- if (wp->flags&SWP_HIDEWINDOW && mutex_bAnimationInProgress)
- return 0;
+ WINDOWPOS *wp = (WINDOWPOS *)lParam;
+ if (wp->flags&SWP_HIDEWINDOW && mutex_bAnimationInProgress)
+ return 0;
if (g_CluiData.fOnDesktop)
wp->flags |= SWP_NOACTIVATE|SWP_NOZORDER;
return DefWindowProc(m_hWnd, msg, wParam, lParam);
@@ -2186,10 +2183,10 @@ LRESULT CLUI::OnPaint( UINT msg, WPARAM wParam, LPARAM lParam ) HDC paintDC;
GetClientRect(m_hWnd,&w);
- if ( !(w.right>0 && w.bottom>0)) return DefWindowProc(m_hWnd, msg, wParam, lParam);
+ if ( !(w.right>0 && w.bottom>0)) return DefWindowProc(m_hWnd, msg, wParam, lParam);
if ( !g_CluiData.fDisableSkinEngine)
- {
+ {
paintDC = GetDC(m_hWnd);
w2 = w;
hdc = CreateCompatibleDC(paintDC);
@@ -2206,7 +2203,7 @@ LRESULT CLUI::OnPaint( UINT msg, WPARAM wParam, LPARAM lParam ) HDC hdc = BeginPaint(m_hWnd,&ps);
ske_BltBackImage(m_hWnd,hdc,&ps.rcPaint);
ps.fErase = FALSE;
- EndPaint(m_hWnd,&ps);
+ EndPaint(m_hWnd,&ps);
}
ValidateRect(m_hWnd,NULL);
@@ -2230,7 +2227,7 @@ LRESULT CLUI::OnPaint( UINT msg, WPARAM wParam, LPARAM lParam ) w2 = ps.rcPaint;
SkinDrawGlyph(ps.hdc,&w,&w2,"Main,ID=Background,Opt=Non-Layered");
ps.fErase = FALSE;
- EndPaint(m_hWnd,&ps);
+ EndPaint(m_hWnd,&ps);
}
}
}
@@ -2240,7 +2237,7 @@ LRESULT CLUI::OnPaint( UINT msg, WPARAM wParam, LPARAM lParam ) LRESULT CLUI::OnCreate( UINT msg, WPARAM wParam, LPARAM lParam )
{
TranslateMenu(GetMenu(m_hWnd));
- DrawMenuBar(m_hWnd);
+ DrawMenuBar(m_hWnd);
CLUIServices_ProtocolStatusChanged(0,0);
{ MENUITEMINFO mii;
@@ -2260,7 +2257,7 @@ LRESULT CLUI::OnCreate( UINT msg, WPARAM wParam, LPARAM lParam ) // mii.fMask = MIIM_TYPE;
mii.fType = MFT_OWNERDRAW;
mii.dwItemData = MENU_MINIMIZE;
- SetMenuItemInfo(GetMenu(m_hWnd),2,TRUE,&mii);
+ SetMenuItemInfo(GetMenu(m_hWnd),2,TRUE,&mii);
}
//PostMessage(m_hWnd, M_CREATECLC, 0, 0);
//pcli->hwndContactList = m_hWnd;
@@ -2277,7 +2274,7 @@ LRESULT CLUI::OnSetAllExtraIcons( UINT /*msg*/, WPARAM /*wParam*/, LPARAM /*lPar LRESULT CLUI::OnCreateClc( UINT /*msg*/, WPARAM /*wParam*/, LPARAM /*lParam*/ )
{
CreateCLC();
- if ( db_get_b( NULL, "CList", "ShowOnStart", SETTING_SHOWONSTART_DEFAULT ))
+ if ( db_get_b( NULL, "CList", "ShowOnStart", SETTING_SHOWONSTART_DEFAULT ))
cliShowHide((WPARAM) m_hWnd, (LPARAM)TRUE );
PostMessage( pcli->hwndContactTree, CLM_AUTOREBUILD, 0, 0 );
return FALSE;
@@ -2305,13 +2302,13 @@ LRESULT CLUI::OnParentNotify( UINT msg, WPARAM wParam, LPARAM lParam ) {
POINT pt;
- pt.x = (short)LOWORD(lParam);
- pt.y = (short)HIWORD(lParam);
+ pt.x = (short)LOWORD(lParam);
+ pt.y = (short)HIWORD(lParam);
ClientToScreen( m_hWnd, &pt );
wParam = 0;
lParam = 0;
- if ( CLUI_SizingOnBorder( pt,1 ))
+ if ( CLUI_SizingOnBorder( pt,1 ))
{
mutex_bIgnoreActivation = TRUE;
return 0;
@@ -2349,7 +2346,7 @@ LRESULT CLUI::OnStatusBarUpdateTimer( UINT msg, WPARAM wParam, LPARAM lParam ) status = CallProtoService(pt->szProto,PS_GETSTATUS,0,0);
if ( !(status >= ID_STATUS_CONNECTING && status <= ID_STATUS_CONNECTING+MAX_CONNECT_RETRIES))
- {
+ {
pt->nCycleStartTick = 0;
ImageList_Destroy(pt->himlIconList);
pt->himlIconList = NULL;
@@ -2363,8 +2360,8 @@ LRESULT CLUI::OnStatusBarUpdateTimer( UINT msg, WPARAM wParam, LPARAM lParam ) pt = &CycleStartTick[wParam-TM_STATUSBARUPDATE];
{
if (IsWindowVisible(pcli->hwndStatus)) pcli->pfnInvalidateRect(pcli->hwndStatus,NULL,0);//InvalidateRectZ(pcli->hwndStatus,NULL,TRUE);
- //if (DBGetContactSettingByte(NULL,"CList","TrayIcon",SETTING_TRAYICON_DEFAULT) != SETTING_TRAYICON_CYCLE)
- if (pt->bGlobal)
+ //if (DBGetContactSettingByte(NULL,"CList","TrayIcon",SETTING_TRAYICON_DEFAULT) != SETTING_TRAYICON_CYCLE)
+ if (pt->bGlobal)
cliTrayIconUpdateBase(g_szConnectingProto);
else
cliTrayIconUpdateBase(pt->szProto);
@@ -2383,7 +2380,7 @@ LRESULT CLUI::OnAutoAlphaTimer( UINT msg, WPARAM wParam, LPARAM lParam ) KillTimer(m_hWnd,TM_AUTOALPHA);
inwnd = 1;
}
- else
+ else
{
POINT pt;
HWND hwndPt;
@@ -2403,7 +2400,7 @@ LRESULT CLUI::OnAutoAlphaTimer( UINT msg, WPARAM wParam, LPARAM lParam ) hwn = hwn;
bTransparentFocus = inwnd;
if (bTransparentFocus) CLUI_SmoothAlphaTransition(m_hWnd, (BYTE)db_get_b(NULL,"CList","Alpha",SETTING_ALPHA_DEFAULT), 1);
- else
+ else
{
CLUI_SmoothAlphaTransition(m_hWnd, (BYTE)(g_bTransparentFlag?db_get_b(NULL,"CList","AutoAlpha",SETTING_AUTOALPHA_DEFAULT):255), 1);
}
@@ -2435,20 +2432,20 @@ LRESULT CLUI::OnBringOutTimer( UINT msg, WPARAM wParam, LPARAM lParam ) POINT pt; GetCursorPos(&pt);
HWND hAux = WindowFromPoint(pt);
BOOL mouse_in_window = CLUI_CheckOwnedByClui(hAux);
- if ( !mouse_in_window && GetForegroundWindow() != m_hWnd )
- CLUI_HideBehindEdge();
+ if ( !mouse_in_window && GetForegroundWindow() != m_hWnd )
+ CLUI_HideBehindEdge();
return TRUE;
}
LRESULT CLUI::OnBringInTimer( UINT msg, WPARAM wParam, LPARAM lParam )
{
- //show
+ //show
KillTimer(m_hWnd,TM_BRINGINTIMEOUT);
bShowEventStarted = 0;
KillTimer(m_hWnd,TM_BRINGOUTTIMEOUT);
POINT pt; GetCursorPos(&pt);
HWND hAux = WindowFromPoint(pt);
BOOL mouse_in_window = FALSE;
- while(hAux != NULL)
+ while(hAux != NULL)
{
if (hAux == m_hWnd) { mouse_in_window = TRUE; break;}
hAux = GetParent(hAux);
@@ -2494,7 +2491,7 @@ LRESULT CLUI::OnActivate( UINT msg, WPARAM wParam, LPARAM lParam ) SendMessage(pcli->hwndContactTree, WM_ACTIVATE, wParam, lParam);
if (db_get_b(NULL, "ModernData", "HideBehind", SETTING_HIDEBEHIND_DEFAULT))
{
- if (wParam == WA_INACTIVE && ((HWND)lParam != m_hWnd) && GetParent((HWND)lParam) != m_hWnd && !IsOption)
+ if (wParam == WA_INACTIVE && ((HWND)lParam != m_hWnd) && GetParent((HWND)lParam) != m_hWnd && !IsOption)
{
if ( !g_bCalledFromShowHide) CLUI_UpdateTimer(0);
}
@@ -2504,12 +2501,12 @@ LRESULT CLUI::OnActivate( UINT msg, WPARAM wParam, LPARAM lParam ) }
}
- if ( !IsWindowVisible(m_hWnd) || mutex_bShowHideCalledFromAnimation)
+ if ( !IsWindowVisible(m_hWnd) || mutex_bShowHideCalledFromAnimation)
{
KillTimer(m_hWnd,TM_AUTOALPHA);
return 0;
}
- if (wParam == WA_INACTIVE && ((HWND)lParam != m_hWnd) && !CLUI_CheckOwnedByClui((HWND)lParam) && !IsOption)
+ if (wParam == WA_INACTIVE && ((HWND)lParam != m_hWnd) && !CLUI_CheckOwnedByClui((HWND)lParam) && !IsOption)
{
if (g_bTransparentFlag)
if (bTransparentFocus)
@@ -2530,11 +2527,11 @@ LRESULT CLUI::OnActivate( UINT msg, WPARAM wParam, LPARAM lParam ) {
BYTE alpha;
if (wParam != WA_INACTIVE || CLUI_CheckOwnedByClui((HWND)lParam) || IsOption || ((HWND)lParam == m_hWnd) || GetParent((HWND)lParam) == m_hWnd) alpha = db_get_b(NULL,"CList","Alpha",SETTING_ALPHA_DEFAULT);
- else
+ else
alpha = g_bTransparentFlag?db_get_b(NULL,"CList","AutoAlpha",SETTING_AUTOALPHA_DEFAULT):255;
CLUI_SmoothAlphaTransition(m_hWnd, alpha, 1);
if (IsOption) DefWindowProc(m_hWnd,msg,wParam,lParam);
- else return 1;
+ else return 1;
}
return DefWindowProc(m_hWnd,msg,wParam,lParam);
}
@@ -2550,15 +2547,15 @@ LRESULT CLUI::OnSetCursor( UINT msg, WPARAM wParam, LPARAM lParam ) bTransparentFocus = 1;
CLUI_SafeSetTimer(m_hWnd, TM_AUTOALPHA,250,NULL);
}
- }
- int k = CLUI_TestCursorOnBorders();
+ }
+ int k = CLUI_TestCursorOnBorders();
return k ? k : 1;
}
LRESULT CLUI::OnMouseActivate( UINT msg, WPARAM wParam, LPARAM lParam )
{
- if ( mutex_bIgnoreActivation )
+ if ( mutex_bIgnoreActivation )
{
mutex_bIgnoreActivation = 0;
return( MA_NOACTIVATEANDEAT );
@@ -2571,8 +2568,8 @@ LRESULT CLUI::OnMouseActivate( UINT msg, WPARAM wParam, LPARAM lParam ) LRESULT CLUI::OnNcLButtonDown( UINT msg, WPARAM wParam, LPARAM lParam )
{
POINT pt;
- pt.x = (short)LOWORD(lParam);
- pt.y = (short)HIWORD(lParam);
+ pt.x = (short)LOWORD(lParam);
+ pt.y = (short)HIWORD(lParam);
int k = CLUI_SizingOnBorder(pt,1);
return k ? k : DefWindowProc( m_hWnd, msg, wParam, lParam );
}
@@ -2584,8 +2581,8 @@ LRESULT CLUI::OnNcLButtonDblClk( UINT msg, WPARAM wParam, LPARAM lParam ) RECT rc;
GetWindowRect(m_hWnd, &rc);
POINT pt;
- pt.x = (short)LOWORD(lParam);
- pt.y = (short)HIWORD(lParam);
+ pt.x = (short)LOWORD(lParam);
+ pt.y = (short)HIWORD(lParam);
if ( pt.x > rc.right - 16 && pt.x < rc.right )
return CallService(MS_CLIST_SHOWHIDE, 0, 0);
}
@@ -2597,13 +2594,13 @@ LRESULT CLUI::OnNcHitTest( UINT msg, WPARAM wParam, LPARAM lParam ) LRESULT result;
result = DefWindowProc(m_hWnd,WM_NCHITTEST,wParam,lParam);
- if ((g_CluiData.fAutoSize) && ( result == HTSIZE || result == HTTOP ||
- result == HTTOPLEFT || result == HTTOPRIGHT ||
- result == HTBOTTOM || result == HTBOTTOMRIGHT ||
+ if ((g_CluiData.fAutoSize) && ( result == HTSIZE || result == HTTOP ||
+ result == HTTOPLEFT || result == HTTOPRIGHT ||
+ result == HTBOTTOM || result == HTBOTTOMRIGHT ||
result == HTBOTTOMLEFT))
return HTCLIENT;
- if (result == HTMENU)
+ if (result == HTMENU)
{
int t;
POINT pt;
@@ -2620,7 +2617,7 @@ LRESULT CLUI::OnNcHitTest( UINT msg, WPARAM wParam, LPARAM lParam ) POINT pt;
int k;
pt.x = (short)LOWORD(lParam);
- pt.y = (short)HIWORD(lParam);
+ pt.y = (short)HIWORD(lParam);
k = CLUI_SizingOnBorder(pt,0);
if ( !k && (db_get_b(NULL,"CLUI","ClientAreaDrag",SETTING_CLIENTDRAG_DEFAULT)))
return HTCAPTION;
@@ -2634,13 +2631,13 @@ LRESULT CLUI::OnShowWindow( UINT msg, WPARAM wParam, LPARAM lParam ) BYTE gAlpha;
if (lParam) return 0;
- if (mutex_bShowHideCalledFromAnimation) return 1;
+ if (mutex_bShowHideCalledFromAnimation) return 1;
{
if ( !wParam) gAlpha = 0;
- else
+ else
gAlpha = (db_get_b(NULL,"CList","Transparent",SETTING_TRANSPARENT_DEFAULT)?db_get_b(NULL,"CList","Alpha",SETTING_ALPHA_DEFAULT):255);
- if (wParam)
+ if (wParam)
{
g_CluiData.bCurrentAlpha = 0;
Sync(CLUIFrames_OnShowHide, pcli->hwndContactList,1);
@@ -2719,7 +2716,7 @@ LRESULT CLUI::OnListSizeChangeNotify( NMCLISTCONTROL * pnmc ) return FALSE;
if (mutex_bDuringSizing)
rcWindow = rcSizingRect;
- else
+ else
GetWindowRect(m_hWnd,&rcWindow);
if ( !g_CluiData.fAutoSize || pcli->hwndContactTree == 0 || CallService(MS_CLIST_DOCKINGISDOCKED,0,0))
return FALSE;
@@ -2730,7 +2727,7 @@ LRESULT CLUI::OnListSizeChangeNotify( NMCLISTCONTROL * pnmc ) GetWindowRect(pcli->hwndContactTree,&rcTree);
FRAMEWND* frm = FindFrameByItsHWND(pcli->hwndContactTree);
- if (frm)
+ if (frm)
rcTree2 = frm->wndSize;
else
SetRect(&rcTree2,0,0,0,0);
@@ -2748,7 +2745,7 @@ LRESULT CLUI::OnListSizeChangeNotify( NMCLISTCONTROL * pnmc ) }
- if (pnmc->pt.y>(rcWorkArea.bottom-rcWorkArea.top))
+ if (pnmc->pt.y>(rcWorkArea.bottom-rcWorkArea.top))
{
pnmc->pt.y = (rcWorkArea.bottom-rcWorkArea.top);
@@ -2779,10 +2776,10 @@ LRESULT CLUI::OnListSizeChangeNotify( NMCLISTCONTROL * pnmc ) nRequiredHeight = 1;
if (mutex_bDuringSizing)
{
- bNeedFixSizingRect = 1;
+ bNeedFixSizingRect = 1;
rcSizingRect.top = rcWindow.top;
rcSizingRect.bottom = rcWindow.bottom;
- rcCorrectSizeRect = rcSizingRect;
+ rcCorrectSizeRect = rcSizingRect;
}
else
{
@@ -2815,7 +2812,7 @@ LRESULT CLUI::OnClickNotify( NMCLISTCONTROL * pnmc ) if (hItem && !(hitFlags & CLCHT_NOWHERE))
return DefCluiWndProc( WM_NOTIFY, 0, (LPARAM)pnmc );
- if ((hitFlags & (CLCHT_NOWHERE | CLCHT_INLEFTMARGIN | CLCHT_BELOWITEMS)) == 0)
+ if ((hitFlags & (CLCHT_NOWHERE | CLCHT_INLEFTMARGIN | CLCHT_BELOWITEMS)) == 0)
return DefCluiWndProc( WM_NOTIFY, 0, (LPARAM)pnmc );
if (db_get_b(NULL,"CLUI","ClientAreaDrag",SETTING_CLIENTDRAG_DEFAULT)) {
@@ -2831,22 +2828,22 @@ LRESULT CLUI::OnClickNotify( NMCLISTCONTROL * pnmc ) return ClcEnterDragToScroll(pcli->hwndContactTree,pnmc->pt.y);
return 0;
-}
+}
LRESULT CLUI::OnNotify( UINT msg, WPARAM wParam, LPARAM lParam )
{
LPNMHDR pnmhdr = (LPNMHDR)lParam;
- if ( pnmhdr->hwndFrom != pcli->hwndContactTree )
+ if ( pnmhdr->hwndFrom != pcli->hwndContactTree )
return DefCluiWndProc( msg, wParam, lParam );
- switch ( pnmhdr->code)
+ switch ( pnmhdr->code)
{
case CLN_NEWCONTACT: return OnNewContactNotify((NMCLISTCONTROL *)pnmhdr );
case CLN_LISTREBUILT: return OnListRebuildNotify((NMCLISTCONTROL *)pnmhdr );
case CLN_LISTSIZECHANGE: return OnListSizeChangeNotify((NMCLISTCONTROL *)pnmhdr );
case NM_CLICK: return OnClickNotify((NMCLISTCONTROL *)pnmhdr );
- }
+ }
return DefCluiWndProc( msg, wParam, lParam );
}
@@ -2857,7 +2854,7 @@ LRESULT CLUI::OnContextMenu( UINT msg, WPARAM wParam, LPARAM lParam ) pt.x = (short)LOWORD(lParam);
pt.y = (short)HIWORD(lParam);
- // x/y might be -1 if it was generated by a kb click
+ // x/y might be -1 if it was generated by a kb click
GetWindowRect(pcli->hwndContactTree,&rc);
if ( pt.x == -1 && pt.y == -1) {
// all this is done in screen-coords!
@@ -2865,7 +2862,7 @@ LRESULT CLUI::OnContextMenu( UINT msg, WPARAM wParam, LPARAM lParam ) // the mouse isnt near the window, so put it in the middle of the window
if ( !PtInRect(&rc,pt)) {
pt.x = rc.left + (rc.right - rc.left) / 2;
- pt.y = rc.top + (rc.bottom - rc.top) / 2;
+ pt.y = rc.top + (rc.bottom - rc.top) / 2;
}
}
if (PtInRect( &rc ,pt ))
@@ -2913,13 +2910,13 @@ LRESULT CLUI::OnDrawItem( UINT msg, WPARAM wParam, LPARAM lParam ) if (dis->CtlType == ODT_MENU) {
if (dis->itemData == MENU_MIRANDAMENU) {
if ( !g_CluiData.fLayered)
- {
- char buf[255];
- short offset = 1 + ( dis->itemState&ODS_SELECTED ? 1 : 0 )
+ {
+ char buf[255];
+ short offset = 1 + ( dis->itemState&ODS_SELECTED ? 1 : 0 )
- ( dis->itemState&ODS_HOTLIGHT ? 1 : 0 );
-
+
HICON hIcon = LoadSkinnedIcon(SKINICON_OTHER_MAINMENU);
-
+
CLUI_DrawMenuBackGround(m_hWnd, dis->hDC, 1, dis->itemState);
mir_snprintf(buf,SIZEOF(buf),"Main,ID=MainMenu,Selected=%s,Hot=%s",(dis->itemState&ODS_SELECTED)?"True":"False",(dis->itemState&ODS_HOTLIGHT)?"True":"False");
SkinDrawGlyph(dis->hDC,&dis->rcItem,&dis->rcItem,buf);
@@ -2927,10 +2924,10 @@ LRESULT CLUI::OnDrawItem( UINT msg, WPARAM wParam, LPARAM lParam ) int x = (dis->rcItem.right + dis->rcItem.left - GetSystemMetrics(SM_CXSMICON)) / 2 + offset;
int y = (dis->rcItem.bottom + dis->rcItem.top - GetSystemMetrics(SM_CYSMICON)) / 2 + offset;
- DrawState( dis->hDC, NULL, NULL, (LPARAM)hIcon, 0, x, y , 0 , 0 ,
+ DrawState( dis->hDC, NULL, NULL, (LPARAM)hIcon, 0, x, y , 0 , 0 ,
DST_ICON | ( dis->itemState & ODS_INACTIVE && (((FALSE))) ? DSS_DISABLED : DSS_NORMAL ));
- CallService(MS_SKIN2_RELEASEICON, (WPARAM)hIcon, 0);
+ Skin_ReleaseIcon(hIcon);
nMirMenuState = dis->itemState;
} else {
nMirMenuState = dis->itemState;
@@ -2966,14 +2963,14 @@ LRESULT CLUI::OnDrawItem( UINT msg, WPARAM wParam, LPARAM lParam ) } else if (dis->itemData == MENU_MINIMIZE && !g_CluiData.fLayered)
{
//TODO check if caption is visible
- char buf[255] = {0};
+ char buf[255] = {0};
short dx = 1+(dis->itemState&ODS_SELECTED?1:0)-(dis->itemState&ODS_HOTLIGHT?1:0);
HICON hIcon = LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
CLUI_DrawMenuBackGround(m_hWnd, dis->hDC, 3, dis->itemState);
mir_snprintf(buf,SIZEOF(buf),"Main,ID=MainMenu,Selected=%s,Hot=%s",(dis->itemState&ODS_SELECTED)?"True":"False",(dis->itemState&ODS_HOTLIGHT)?"True":"False");
SkinDrawGlyph(dis->hDC,&dis->rcItem,&dis->rcItem,buf);
DrawState(dis->hDC,NULL,NULL,(LPARAM)hIcon,0,(dis->rcItem.right+dis->rcItem.left-GetSystemMetrics(SM_CXSMICON))/2+dx,(dis->rcItem.bottom+dis->rcItem.top-GetSystemMetrics(SM_CYSMICON))/2+dx,0,0,DST_ICON|(dis->itemState&ODS_INACTIVE && FALSE?DSS_DISABLED:DSS_NORMAL));
- CallService(MS_SKIN2_RELEASEICON, (WPARAM)hIcon, 0);
+ Skin_ReleaseIcon(hIcon);
nMirMenuState = dis->itemState;
}
@@ -3006,7 +3003,7 @@ LRESULT CLUI::OnDestroy( UINT msg, WPARAM wParam, LPARAM lParam ) }
TRACE("CLUI.c: WM_DESTROY - WaitThreadsCompletion \n");
- while (CLUI_WaitThreadsCompletion(m_hWnd)); //stop all my threads
+ while (CLUI_WaitThreadsCompletion(m_hWnd)); //stop all my threads
TRACE("CLUI.c: WM_DESTROY - WaitThreadsCompletion DONE\n");
for (int i=0; i < 64; i++)
@@ -3022,9 +3019,9 @@ LRESULT CLUI::OnDestroy( UINT msg, WPARAM wParam, LPARAM lParam ) RemoveMenu(g_hMenuMain, 0, MF_BYPOSITION);
DestroyMenu(g_hMenuMain);
- pcli->pfnTrayIconDestroy(m_hWnd);
- mutex_bAnimationInProgress = 0;
- CallService(MS_CLIST_FRAMES_REMOVEFRAME,(WPARAM)hFrameContactTree,0);
+ pcli->pfnTrayIconDestroy(m_hWnd);
+ mutex_bAnimationInProgress = 0;
+ CallService(MS_CLIST_FRAMES_REMOVEFRAME,(WPARAM)hFrameContactTree,0);
TRACE("CLUI.c: WM_DESTROY - hFrameContactTree removed\n");
pcli->hwndContactTree = NULL;
pcli->hwndStatus = NULL;
@@ -3035,7 +3032,7 @@ LRESULT CLUI::OnDestroy( UINT msg, WPARAM wParam, LPARAM lParam ) GetWindowRect(pcli->hwndContactList,&r);
if (db_get_b(NULL,"CLUI","AutoSizeUpward",SETTING_AUTOSIZEUPWARD_DEFAULT))
r.top = r.bottom-CLUIFrames_GetTotalHeight();
- else
+ else
r.bottom = r.top+CLUIFrames_GetTotalHeight();
db_set_dw(NULL,"CList","y",r.top);
db_set_dw(NULL,"CList","Height",r.bottom-r.top);
diff --git a/plugins/Clist_modern/src/modern_cluiframes.cpp b/plugins/Clist_modern/src/modern_cluiframes.cpp index d031d33ec9..f08b600ce5 100644 --- a/plugins/Clist_modern/src/modern_cluiframes.cpp +++ b/plugins/Clist_modern/src/modern_cluiframes.cpp @@ -1236,7 +1236,7 @@ static int UpdateTBToolTip(int framepos) ti.uFlags = TTF_IDISHWND|TTF_SUBCLASS ;
ti.uId = (UINT_PTR)g_pfwFrames[framepos].TitleBar.hwnd;
- return(SendMessage(g_pfwFrames[framepos].TitleBar.hwndTip,TTM_UPDATETIPTEXT ,(WPARAM)0,(LPARAM)&ti));
+ return(SendMessage(g_pfwFrames[framepos].TitleBar.hwndTip,TTM_UPDATETIPTEXT ,0,(LPARAM)&ti));
}
};
@@ -1292,7 +1292,7 @@ static int _us_DoSetFrameOptions(WPARAM wParam,LPARAM lParam) return 0;
case FO_NAME:
- if (lParam == (LPARAM)NULL)
+ if (lParam == 0)
return -1;
mir_free(fw.Name);
@@ -1308,7 +1308,7 @@ static int _us_DoSetFrameOptions(WPARAM wParam,LPARAM lParam) return 0;
case FO_TBNAME:
- if (lParam == (LPARAM)NULL) { return(-1);}
+ if (lParam == 0) { return(-1);}
mir_free(fw.TitleBar.tbname);
mir_free(fw.TitleBar.sztbname);
@@ -1326,7 +1326,7 @@ static int _us_DoSetFrameOptions(WPARAM wParam,LPARAM lParam) return 0;
case FO_TBTIPNAME:
- if (lParam == (LPARAM)NULL) { return(-1);}
+ if (lParam == 0) { return(-1);}
if (fw.TitleBar.tooltip != NULL) mir_free_and_nil(fw.TitleBar.tooltip);
if (fw.TitleBar.sztooltip != NULL) mir_free_and_nil(fw.TitleBar.sztooltip);
if (bUnicodeText)
@@ -1966,7 +1966,7 @@ static int _us_DoAddFrame(WPARAM wParam,LPARAM lParam) ti.hinst = g_hInst;
ti.uFlags = TTF_IDISHWND|TTF_SUBCLASS ;
ti.uId = (UINT_PTR)g_pfwFrames[g_nFramesCount].TitleBar.hwnd;
- res = SendMessageA(g_pfwFrames[g_nFramesCount].TitleBar.hwndTip,TTM_ADDTOOL,(WPARAM)0,(LPARAM)&ti);
+ res = SendMessageA(g_pfwFrames[g_nFramesCount].TitleBar.hwndTip,TTM_ADDTOOL,0,(LPARAM)&ti);
}
SendMessageA(g_pfwFrames[g_nFramesCount].TitleBar.hwndTip,TTM_ACTIVATE,(WPARAM)g_pfwFrames[g_nFramesCount].TitleBar.ShowTitleBarTip,0);
@@ -3700,7 +3700,7 @@ static LRESULT CALLBACK CLUIFrameContainerWndProc(HWND hwnd, UINT msg, WPARAM wP memset(&minmax,0,sizeof(minmax));
- if (SendMessage(g_pfwFrames[framepos].hWnd,WM_GETMINMAXINFO,(WPARAM)0,(LPARAM)&minmax) == 0)
+ if (SendMessage(g_pfwFrames[framepos].hWnd,WM_GETMINMAXINFO,0,(LPARAM)&minmax) == 0)
{
RECT border;
int tbh = g_nTitleBarHeight*btoint(g_pfwFrames[framepos].TitleBar.ShowTitleBar);
diff --git a/plugins/Clist_modern/src/modern_extraimage.cpp b/plugins/Clist_modern/src/modern_extraimage.cpp index 98fe4f177e..05f0efc970 100644 --- a/plugins/Clist_modern/src/modern_extraimage.cpp +++ b/plugins/Clist_modern/src/modern_extraimage.cpp @@ -40,7 +40,7 @@ void SetNewExtraColumnCount() void ExtraImage_ReloadExtraIcons()
{
SendMessage(pcli->hwndContactTree,CLM_SETEXTRACOLUMNSSPACE,db_get_b(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);
if (hWideExtraImageList)
diff --git a/plugins/Clist_modern/src/modern_groupmenu.cpp b/plugins/Clist_modern/src/modern_groupmenu.cpp index 2abef3c387..b1de089fbb 100644 --- a/plugins/Clist_modern/src/modern_groupmenu.cpp +++ b/plugins/Clist_modern/src/modern_groupmenu.cpp @@ -106,7 +106,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;
}
@@ -291,23 +291,23 @@ void GroupMenus_Init(void) tmp.CheckService = NULL;
tmp.ExecService = "CLISTMENUSGroup/ExecService";
tmp.name = LPGEN("GroupMenu");
- 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
@@ -321,7 +321,7 @@ void GroupMenus_Init(void) mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_EXIT);
mi.pszName = LPGEN("E&xit");
mi.flags = CMIF_ICONFROMICOLIB;
- AddGroupMenuItem((WPARAM)0,(LPARAM)&mi);
+ AddGroupMenuItem(0,(LPARAM)&mi);
DestroyIcon_protect(mi.hIcon);
memset(&mi,0,sizeof(mi));
@@ -331,7 +331,7 @@ void GroupMenus_Init(void) mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_SHOWHIDE);
mi.pszName = LPGEN("&Hide/Show");
mi.flags = CMIF_ICONFROMICOLIB;
- hHideShowMainMenuItem = (HANDLE)AddGroupMenuItem((WPARAM)0,(LPARAM)&mi);
+ hHideShowMainMenuItem = (HANDLE)AddGroupMenuItem(0,(LPARAM)&mi);
DestroyIcon_protect(mi.hIcon);
memset(&mi,0,sizeof(mi));
@@ -341,7 +341,7 @@ void GroupMenus_Init(void) mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_FINDUSER);
mi.pszService = "FindAdd/FindAddCommand";
mi.pszName = LPGEN("&Find/Add Contacts...");
- AddGroupMenuItem((WPARAM)0,(LPARAM)&mi);
+ AddGroupMenuItem(0,(LPARAM)&mi);
DestroyIcon_protect(mi.hIcon);
@@ -352,7 +352,7 @@ void GroupMenus_Init(void) mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_MAINMENU); // eternity #004
mi.pszName = LPGEN("&Main Menu");
mi.flags = CMIF_ICONFROMICOLIB; // eternity #004
- hGroupMainMenuItemProxy = (HANDLE)AddGroupMenuItem((WPARAM)0,(LPARAM)&mi);
+ hGroupMainMenuItemProxy = (HANDLE)AddGroupMenuItem(0,(LPARAM)&mi);
DestroyIcon_protect(mi.hIcon); // eternity #004
memset(&mi,0,sizeof(mi));
@@ -362,7 +362,7 @@ void GroupMenus_Init(void) mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_STATUS); // eternity #004
mi.pszName = LPGEN("&Status");
mi.flags = CMIF_ICONFROMICOLIB; // eternity #004
- hGroupStatusMenuItemProxy = (HANDLE)AddGroupMenuItem((WPARAM)0,(LPARAM)&mi);
+ hGroupStatusMenuItemProxy = (HANDLE)AddGroupMenuItem(0,(LPARAM)&mi);
DestroyIcon_protect(mi.hIcon); // eternity #004
memset(&mi,0,sizeof(mi));
@@ -372,7 +372,7 @@ void GroupMenus_Init(void) mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_OPTIONS);
mi.pszService = "Options/OptionsCommand";
mi.pszName = LPGEN("&Options...");
- AddGroupMenuItem((WPARAM)0,(LPARAM)&mi);
+ AddGroupMenuItem(0,(LPARAM)&mi);
DestroyIcon_protect(mi.hIcon);
memset(&mi,0,sizeof(mi));
@@ -382,7 +382,7 @@ void GroupMenus_Init(void) mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_MIRANDA);
mi.pszService = "Help/AboutCommand";
mi.pszName = LPGEN("&About");
- AddGroupMenuItem((WPARAM)0,(LPARAM)&mi);
+ AddGroupMenuItem(0,(LPARAM)&mi);
DestroyIcon_protect(mi.hIcon);
memset(&mi,0,sizeof(mi));
@@ -391,7 +391,7 @@ void GroupMenus_Init(void) mi.hIcon = ske_ImageList_GetIcon(hCListImages,NewGroupIconidx,0);
mi.pszService = "CLISTMENUSGroup/CreateGroupHelper";
mi.pszName = LPGEN("&New Group");
- hNewGroupMenuItem = (HANDLE)AddGroupMenuItem((WPARAM)0,(LPARAM)&mi);
+ hNewGroupMenuItem = (HANDLE)AddGroupMenuItem(0,(LPARAM)&mi);
DestroyIcon_protect(mi.hIcon);
memset(&mi,0,sizeof(mi));
@@ -409,7 +409,7 @@ void GroupMenus_Init(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));
@@ -418,7 +418,7 @@ void GroupMenus_Init(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);
@@ -428,7 +428,7 @@ void GroupMenus_Init(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);
@@ -551,7 +551,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;
}
@@ -672,27 +672,27 @@ void InitSubGroupMenus(void) tmp.CheckService = NULL;
tmp.ExecService = "CLISTMENUSSubGroup/ExecService";
tmp.name = LPGEN("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);
op.Handle = hSubGroupMenuObject;
op.Setting = OPT_MENUOBJECT_SET_CHECK_SERVICE;
op.Value = (INT_PTR)"CLISTMENUSSubGroup/SubGroupMenuCheckService";
- CallService(MO_SETOPTIONSMENUOBJECT,(WPARAM)0,(LPARAM)&op);
+ CallService(MO_SETOPTIONSMENUOBJECT,0,(LPARAM)&op);
//add exit command to menu
CLISTMENUITEM mi;
diff --git a/plugins/Clist_modern/src/modern_rowtemplateopt.cpp b/plugins/Clist_modern/src/modern_rowtemplateopt.cpp index f3179c982c..2fb5444032 100644 --- a/plugins/Clist_modern/src/modern_rowtemplateopt.cpp +++ b/plugins/Clist_modern/src/modern_rowtemplateopt.cpp @@ -294,7 +294,7 @@ void rowOptDelContainer(HWND htree, HTREEITEM hti) else
{
- tvpi.lParam = (LPARAM)NULL;
+ tvpi.lParam = 0;
rowOptTmplRoot = (pROWCELL)tvpi.lParam;
}
diff --git a/plugins/Clist_modern/src/modern_skineditor.cpp b/plugins/Clist_modern/src/modern_skineditor.cpp index b567fd59b9..0b1f0fe7f9 100644 --- a/plugins/Clist_modern/src/modern_skineditor.cpp +++ b/plugins/Clist_modern/src/modern_skineditor.cpp @@ -100,7 +100,7 @@ int TreeAddObject(HWND hwndDlg, int ID, OPT_OBJECT_DATA * data) tvis.hInsertAfter = TVI_SORT;
tvis.item.mask = TVIF_PARAM|TVIF_TEXT|TVIF_PARAM;
tvis.item.pszText = ptr;
- tvis.item.lParam = (LPARAM)NULL;
+ tvis.item.lParam = 0;
cItem = TreeView_InsertItemA(GetDlgItem(hwndDlg,ID),&tvis);
}
@@ -256,8 +256,8 @@ void SetControls(HWND hwndDlg, char * str) g = atoi(GetParamN(str,buf,SIZEOF(buf),3,',',TRUE));
b = atoi(GetParamN(str,buf,SIZEOF(buf),4,',',TRUE));
a = atoi(GetParamN(str,buf,SIZEOF(buf),5,',',TRUE));
- SendDlgItemMessage(hwndDlg,IDC_COLOR,CPM_SETCOLOUR,(WPARAM)0,(LPARAM)RGB(r,g,b));
- SendDlgItemMessage(hwndDlg,IDC_COLOR,CPM_SETDEFAULTCOLOUR,(WPARAM)0,(LPARAM)RGB(r,g,b));
+ SendDlgItemMessage(hwndDlg,IDC_COLOR,CPM_SETCOLOUR,0,(LPARAM)RGB(r,g,b));
+ SendDlgItemMessage(hwndDlg,IDC_COLOR,CPM_SETDEFAULTCOLOUR,0,(LPARAM)RGB(r,g,b));
SendDlgItemMessage(hwndDlg,IDC_SPIN_ALPHA,UDM_SETPOS,0,MAKELONG(a,0));
}
break;
@@ -369,7 +369,7 @@ int GetShortFileName(char * FullFile) char * MadeString(HWND hwndDlg)
{
char buf[MAX_PATH*2] = {0};
- int i = SendDlgItemMessage(hwndDlg,IDC_TYPE,CB_GETCURSEL,(WPARAM)0,0);
+ int i = SendDlgItemMessage(hwndDlg,IDC_TYPE,CB_GETCURSEL,0,0);
switch (i)
{
case 0:
@@ -380,7 +380,7 @@ char * MadeString(HWND hwndDlg) BYTE a;
DWORD col;
a = (BYTE)SendDlgItemMessage(hwndDlg,IDC_SPIN_ALPHA,UDM_GETPOS,0,0);
- col = (DWORD)SendDlgItemMessage(hwndDlg,IDC_COLOR,CPM_GETCOLOUR,(WPARAM)0,0);
+ col = (DWORD)SendDlgItemMessage(hwndDlg,IDC_COLOR,CPM_GETCOLOUR,0,0);
mir_snprintf(buf,SIZEOF(buf),"Glyph,Solid,%d,%d,%d,%d",GetRValue(col),GetGValue(col),GetBValue(col),a);
}
break;
@@ -591,7 +591,7 @@ INT_PTR CALLBACK DlgSkinEditorOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM {
if (HIWORD(wParam) == CBN_SELCHANGE)
{
- int i = SendDlgItemMessage(hwndDlg,IDC_TYPE,CB_GETCURSEL,(WPARAM)0,0);
+ int i = SendDlgItemMessage(hwndDlg,IDC_TYPE,CB_GETCURSEL,0,0);
//if (IsWindowEnabled(GetDlgItem(hwndDlg,IDC_TYPE)))
SetAppropriateGroups(hwndDlg,i);
if (GetFocus() == GetDlgItem(hwndDlg,IDC_TYPE))
@@ -671,7 +671,7 @@ INT_PTR CALLBACK DlgSkinEditorOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM res = GetOpenFileNameA(&ofn);
if (res) {
GetShortFileName(ofn.lpstrFile);
- SendDlgItemMessageA(hwndDlg,IDC_FILE,WM_SETTEXT,(WPARAM)0,(LPARAM)ofn.lpstrFile);
+ SendDlgItemMessageA(hwndDlg,IDC_FILE,WM_SETTEXT,0,(LPARAM)ofn.lpstrFile);
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
UpdateInfo(hwndDlg);
}
@@ -785,7 +785,7 @@ INT_PTR CALLBACK DlgSkinEditorOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM pcli->pfnClcBroadcast( INTM_RELOADOPTIONS,0,0);
Sync(CLUIFrames_OnClistResize_mod,0,0);
ske_RedrawCompleteWindow();
- Sync(CLUIFrames_OnClistResize_mod, (WPARAM)0, 0);
+ Sync(CLUIFrames_OnClistResize_mod, 0, 0);
{
HWND hwnd = pcli->hwndContactList;
RECT rc = {0};
diff --git a/plugins/Clist_modern/src/modern_statusbar.cpp b/plugins/Clist_modern/src/modern_statusbar.cpp index 29900cd471..505e27fd3f 100644 --- a/plugins/Clist_modern/src/modern_statusbar.cpp +++ b/plugins/Clist_modern/src/modern_statusbar.cpp @@ -543,13 +543,13 @@ int ModernDrawStatusBarWorker(HWND hWnd, HDC hDC) HICON hLockOverlay = LoadSkinnedIcon(SKINICON_OTHER_STATUS_LOCKED);
if (hLockOverlay != NULL) {
mod_DrawIconEx_helper(hDC, x, iconY, hLockOverlay, GetSystemMetrics(SM_CXSMICON),GetSystemMetrics(SM_CYSMICON),0,NULL,DI_NORMAL | dim);
- CallService(MS_SKIN2_RELEASEICON, (WPARAM)hLockOverlay, 0);
+ Skin_ReleaseIcon(hLockOverlay);
}
}
}
if (hxIcon) DestroyIcon_protect(hxIcon);
if (NeedDestroy) DestroyIcon_protect(hIcon);
- else CallService(MS_SKIN2_RELEASEICON, (WPARAM)hIcon, 0);
+ else Skin_ReleaseIcon(hIcon);
x += GetSystemMetrics(SM_CXSMICON)+1;
}
diff --git a/plugins/Clist_modern/src/modern_viewmodebar.cpp b/plugins/Clist_modern/src/modern_viewmodebar.cpp index 521a3a7eda..8d795092b8 100644 --- a/plugins/Clist_modern/src/modern_viewmodebar.cpp +++ b/plugins/Clist_modern/src/modern_viewmodebar.cpp @@ -719,7 +719,7 @@ INT_PTR CALLBACK DlgProcViewModesSetup(HWND hwndDlg, UINT msg, WPARAM wParam, LP for (i = ID_STATUS_OFFLINE; i <= ID_STATUS_OUTTOLUNCH; i++) {
hIcon = LoadSkinnedProtoIcon(NULL, i);
ImageList_AddIcon(himlViewModes, hIcon);
- CallService(MS_SKIN2_RELEASEICON, (WPARAM)hIcon, 0);
+ Skin_ReleaseIcon(hIcon);
}
hIcon = (HICON)LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_SMALLDOT), IMAGE_ICON, 16, 16, 0);
@@ -730,10 +730,10 @@ INT_PTR CALLBACK DlgProcViewModesSetup(HWND hwndDlg, UINT msg, WPARAM wParam, LP tci.mask = TCIF_PARAM|TCIF_TEXT;
tci.lParam = 0;
tci.pszText = TranslateT("Sticky contacts");
- SendMessage(GetDlgItem(hwndDlg, IDC_TAB), TCM_INSERTITEM, (WPARAM)0, (LPARAM)&tci);
+ SendMessage(GetDlgItem(hwndDlg, IDC_TAB), TCM_INSERTITEM, 0, (LPARAM)&tci);
tci.pszText = TranslateT("Filtering");
- SendMessage(GetDlgItem(hwndDlg, IDC_TAB), TCM_INSERTITEM, (WPARAM)0, (LPARAM)&tci);
+ SendMessage(GetDlgItem(hwndDlg, IDC_TAB), TCM_INSERTITEM, 0, (LPARAM)&tci);
TabCtrl_SetCurSel(GetDlgItem(hwndDlg, IDC_TAB), 0);
|