summaryrefslogtreecommitdiff
path: root/plugins/Clist_modern/src/modern_docking.cpp
diff options
context:
space:
mode:
authorRozhuk Ivan <rozhuk.im@gmail.com>2014-12-01 00:07:01 +0000
committerRozhuk Ivan <rozhuk.im@gmail.com>2014-12-01 00:07:01 +0000
commitb2fad485cd5b41744ef0cc4a02722c021afd926c (patch)
treeaa19403cd699066600e8306be8ad33e4a17fba6f /plugins/Clist_modern/src/modern_docking.cpp
parentfc62f1f1e1f8af40a1f7efe0ba3afc358fb66ef3 (diff)
ZeroMemory -> memset, few bugs fised
git-svn-id: http://svn.miranda-ng.org/main/trunk@11184 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_modern/src/modern_docking.cpp')
-rw-r--r--plugins/Clist_modern/src/modern_docking.cpp27
1 files changed, 15 insertions, 12 deletions
diff --git a/plugins/Clist_modern/src/modern_docking.cpp b/plugins/Clist_modern/src/modern_docking.cpp
index 32aac83df5..5f61fb4cd4 100644
--- a/plugins/Clist_modern/src/modern_docking.cpp
+++ b/plugins/Clist_modern/src/modern_docking.cpp
@@ -74,7 +74,7 @@ static void Docking_AdjustPosition(HWND hwnd,RECT *rcDisplay,RECT *rc)
{
APPBARDATA abd;
- ZeroMemory(&abd,sizeof(abd));
+ memset(&abd, 0, sizeof(abd));
abd.cbSize = sizeof(abd);
abd.hWnd = hwnd;
abd.uEdge = g_CluiData.fDocked == DOCKED_LEFT?ABE_LEFT:ABE_RIGHT;
@@ -124,7 +124,7 @@ int Docking_ProcessWindowMessage(WPARAM wParam, LPARAM lParam)
g_CluiData.fDocked = (BOOL)db_get_b(NULL,"CList","Docked",0);
if (IsWindowVisible(msg->hwnd) && !IsIconic(msg->hwnd)) {
RECT rc, rcMonitor;
- ZeroMemory(&abd,sizeof(abd));
+ memset(&abd, 0, sizeof(abd));
abd.cbSize = sizeof(abd);
abd.hWnd = msg->hwnd;
abd.lParam = 0;
@@ -144,7 +144,7 @@ int Docking_ProcessWindowMessage(WPARAM wParam, LPARAM lParam)
ModernSkinButton_ReposButtons(msg->hwnd, SBRF_DO_NOT_DRAW,NULL);
return 0;
case WM_ACTIVATE:
- ZeroMemory(&abd,sizeof(abd));
+ memset(&abd, 0, sizeof(abd));
abd.cbSize = sizeof(abd);
abd.hWnd = msg->hwnd;
SHAppBarMessage(ABM_ACTIVATE,&abd);
@@ -155,9 +155,10 @@ int Docking_ProcessWindowMessage(WPARAM wParam, LPARAM lParam)
case WM_WINDOWPOSCHANGED:
{
- if (g_CluiData.fDocked) ModernSkinButton_ReposButtons( msg->hwnd,SBRF_DO_NOT_DRAW, NULL );
- return 0;
- ZeroMemory(&abd,sizeof(abd));
+ if (g_CluiData.fDocked)
+ ModernSkinButton_ReposButtons( msg->hwnd,SBRF_DO_NOT_DRAW, NULL );
+ return 0; // XXX: check me!!!
+ memset(&abd, 0, sizeof(abd));
abd.cbSize = sizeof(abd);
abd.hWnd = msg->hwnd;
SHAppBarMessage(ABM_WINDOWPOSCHANGED,&abd);
@@ -186,7 +187,7 @@ int Docking_ProcessWindowMessage(WPARAM wParam, LPARAM lParam)
|| (ptCursor.x >= rcMonitor.right-EDGESENSITIVITY))
&& db_get_b(NULL,"CLUI","DockToSides",SETTING_DOCKTOSIDES_DEFAULT))
{
- ZeroMemory(&abd,sizeof(abd));
+ memset(&abd, 0, sizeof(abd));
abd.cbSize = sizeof(abd);
abd.hWnd = msg->hwnd;
abd.lParam = 0;
@@ -255,10 +256,12 @@ int Docking_ProcessWindowMessage(WPARAM wParam, LPARAM lParam)
}
case WM_SHOWWINDOW:
{
- if (msg->lParam) return 0;
+ if (msg->lParam)
+ return 0;
BOOL toBeDocked = (BOOL)db_get_b(NULL,"CLUI","DockToSides",SETTING_DOCKTOSIDES_DEFAULT);
- if ((msg->wParam && g_CluiData.fDocked < 0) || (!msg->wParam && g_CluiData.fDocked>0)) g_CluiData.fDocked = -g_CluiData.fDocked;
- ZeroMemory(&abd,sizeof(abd));
+ if ((msg->wParam && g_CluiData.fDocked < 0) || (!msg->wParam && g_CluiData.fDocked>0))
+ g_CluiData.fDocked = -g_CluiData.fDocked;
+ memset(&abd, 0, sizeof(abd));
abd.cbSize = sizeof(abd);
abd.hWnd = msg->hwnd;
if (msg->wParam) {
@@ -306,7 +309,7 @@ int Docking_ProcessWindowMessage(WPARAM wParam, LPARAM lParam)
((g_CluiData.fDocked == DOCKED_RIGHT || g_CluiData.fDocked == -DOCKED_RIGHT) && (short)LOWORD(msg->lParam) < 0)) {
ReleaseCapture();
draggingTitle = 0;
- ZeroMemory(&abd,sizeof(abd));
+ memset(&abd, 0, sizeof(abd));
abd.cbSize = sizeof(abd);
abd.hWnd = msg->hwnd;
SHAppBarMessage(ABM_REMOVE,&abd);
@@ -345,7 +348,7 @@ int Docking_ProcessWindowMessage(WPARAM wParam, LPARAM lParam)
return TRUE;
case WM_DESTROY:
if (g_CluiData.fDocked>0) {
- ZeroMemory(&abd,sizeof(abd));
+ memset(&abd, 0, sizeof(abd));
abd.cbSize = sizeof(abd);
abd.hWnd = msg->hwnd;
SHAppBarMessage(ABM_REMOVE,&abd);