summaryrefslogtreecommitdiff
path: root/plugins/TopToolBar
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-07-15 11:10:19 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-07-15 11:10:19 +0000
commit8e10b13b38995be8e810342d21040a4324cbfeef (patch)
treefe373e4254f152baceceb96837589a0f1fc90100 /plugins/TopToolBar
parentec72adc886bfaac0cb1ed19520a555bbe0f9f1cd (diff)
nasty clutch with the custom window proc replaced with the standard mir_subclassWindow
git-svn-id: http://svn.miranda-ng.org/main/trunk@5359 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TopToolBar')
-rw-r--r--plugins/TopToolBar/TopToolBar_10.vcxproj1
-rw-r--r--plugins/TopToolBar/TopToolBar_10.vcxproj.filters3
-rw-r--r--plugins/TopToolBar/TopToolBar_11.vcxproj1
-rw-r--r--plugins/TopToolBar/TopToolBar_11.vcxproj.filters3
-rw-r--r--plugins/TopToolBar/src/toolbarwnd.cpp21
5 files changed, 13 insertions, 16 deletions
diff --git a/plugins/TopToolBar/TopToolBar_10.vcxproj b/plugins/TopToolBar/TopToolBar_10.vcxproj
index c204b45828..2c863dc385 100644
--- a/plugins/TopToolBar/TopToolBar_10.vcxproj
+++ b/plugins/TopToolBar/TopToolBar_10.vcxproj
@@ -188,6 +188,7 @@
</Link>
</ItemDefinitionGroup>
<ItemGroup>
+ <ClInclude Include="..\ExternalAPI\m_toptoolbar.h" />
<ClInclude Include="src\BkgrCfg.h" />
<ClInclude Include="src\common.h" />
<ClInclude Include="src\resource.h" />
diff --git a/plugins/TopToolBar/TopToolBar_10.vcxproj.filters b/plugins/TopToolBar/TopToolBar_10.vcxproj.filters
index bbb0f350ff..0e75aeb8e7 100644
--- a/plugins/TopToolBar/TopToolBar_10.vcxproj.filters
+++ b/plugins/TopToolBar/TopToolBar_10.vcxproj.filters
@@ -27,6 +27,9 @@
<ClInclude Include="src\version.h">
<Filter>Header Files</Filter>
</ClInclude>
+ <ClInclude Include="..\ExternalAPI\m_toptoolbar.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="res\main.rc">
diff --git a/plugins/TopToolBar/TopToolBar_11.vcxproj b/plugins/TopToolBar/TopToolBar_11.vcxproj
index a70a3b8a41..86ca8e26f3 100644
--- a/plugins/TopToolBar/TopToolBar_11.vcxproj
+++ b/plugins/TopToolBar/TopToolBar_11.vcxproj
@@ -191,6 +191,7 @@
</Link>
</ItemDefinitionGroup>
<ItemGroup>
+ <ClInclude Include="..\ExternalAPI\m_toptoolbar.h" />
<ClInclude Include="src\BkgrCfg.h" />
<ClInclude Include="src\common.h" />
<ClInclude Include="src\resource.h" />
diff --git a/plugins/TopToolBar/TopToolBar_11.vcxproj.filters b/plugins/TopToolBar/TopToolBar_11.vcxproj.filters
index bbb0f350ff..0e75aeb8e7 100644
--- a/plugins/TopToolBar/TopToolBar_11.vcxproj.filters
+++ b/plugins/TopToolBar/TopToolBar_11.vcxproj.filters
@@ -27,6 +27,9 @@
<ClInclude Include="src\version.h">
<Filter>Header Files</Filter>
</ClInclude>
+ <ClInclude Include="..\ExternalAPI\m_toptoolbar.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="res\main.rc">
diff --git a/plugins/TopToolBar/src/toolbarwnd.cpp b/plugins/TopToolBar/src/toolbarwnd.cpp
index b0778edff9..082ea3a590 100644
--- a/plugins/TopToolBar/src/toolbarwnd.cpp
+++ b/plugins/TopToolBar/src/toolbarwnd.cpp
@@ -117,10 +117,6 @@ LRESULT CALLBACK TopToolBarProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara
{
static bool supressRepos = false;
- if (g_ctrl->fnWindowProc != NULL)
- if ( g_ctrl->fnWindowProc(hwnd, msg, wParam, lParam))
- return g_ctrl->lResult;
-
switch(msg) {
case WM_CREATE:
g_ctrl->hWnd = hwnd;
@@ -227,19 +223,12 @@ LRESULT CALLBACK TopToolBarProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara
}
break;
- case TTB_SETCUSTOM:
- {
- TTBCtrlCustomize *pCustom = (TTBCtrlCustomize*)lParam;
- if (pCustom == NULL || g_ctrl->fnWindowProc)
- break;
-
- g_ctrl = (TTBCtrl*)mir_realloc(g_ctrl, pCustom->cbLen);
- if (pCustom->cbLen > sizeof(TTBCtrl))
- memset(g_ctrl+1, 0, pCustom->cbLen - sizeof(TTBCtrl));
+ case TTB_SETCUSTOMDATASIZE:
+ g_ctrl = (TTBCtrl*)mir_realloc(g_ctrl, lParam);
+ if (lParam > sizeof(TTBCtrl))
+ memset(g_ctrl+1, 0, lParam - sizeof(TTBCtrl));
- g_ctrl->fnWindowProc = pCustom->fnWindowProc;
- SetWindowLongPtr(hwnd, 0, (LONG_PTR)g_ctrl);
- }
+ SetWindowLongPtr(hwnd, 0, (LONG_PTR)g_ctrl);
break;
default: