projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
1. corrected (but the fix is ugly) the multiple def button problem
[wxWidgets.git]
/
src
/
msw
/
tbarmsw.cpp
diff --git
a/src/msw/tbarmsw.cpp
b/src/msw/tbarmsw.cpp
index cfbe78c95d78507dac44ef3ab43601eaaa2d8482..92f59a59902732686d9e6b5758e7f23ee922fe86 100644
(file)
--- a/
src/msw/tbarmsw.cpp
+++ b/
src/msw/tbarmsw.cpp
@@
-26,13
+26,14
@@
#if wxUSE_BUTTONBAR && wxUSE_TOOLBAR
#if wxUSE_BUTTONBAR && wxUSE_TOOLBAR
-#if
ndef __GNUWIN32__
+#if
!defined(__GNUWIN32__) && !defined(__SALFORDC__)
#include "malloc.h"
#endif
#include "malloc.h"
#endif
-#if
ndef __MWERKS__
+#if
!defined(__MWERKS__) && !defined(__SALFORDC__)
#include <memory.h>
#endif
#include <memory.h>
#endif
+
#include <stdlib.h>
#include "wx/tbarmsw.h"
#include <stdlib.h>
#include "wx/tbarmsw.h"
@@
-346,7
+347,7
@@
wxToolBarTool *wxToolBarMSW::AddTool(int index, const wxBitmap& bitmap, const wx
wxBitmap bitmap2;
if (toggle)
{
wxBitmap bitmap2;
if (toggle)
{
- bitmap2.SetHBITMAP( (WXHBITMAP) CreateMappedBitmap(
wxGetInstance(), (
HBITMAP) ((wxBitmap& )bitmap).GetHBITMAP()));
+ bitmap2.SetHBITMAP( (WXHBITMAP) CreateMappedBitmap(
(WXHINSTANCE)wxGetInstance(), (WX
HBITMAP) ((wxBitmap& )bitmap).GetHBITMAP()));
}
wxToolBarTool *tool = new wxToolBarTool(index, bitmap, bitmap2, toggle, xPos, yPos, helpString1, helpString2);
}
wxToolBarTool *tool = new wxToolBarTool(index, bitmap, bitmap2, toggle, xPos, yPos, helpString1, helpString2);
@@
-380,7
+381,7
@@
wxToolBarTool *wxToolBarMSW::AddTool(int index, const wxBitmap& bitmap, const wx
return tool;
}
return tool;
}
-void wxToolBarMSW::Layout
(void
)
+void wxToolBarMSW::Layout
Tools(
)
{
m_currentRowsOrColumns = 0;
m_lastX = m_xMargin;
{
m_currentRowsOrColumns = 0;
m_lastX = m_xMargin;
@@
-464,12
+465,20
@@
void wxToolBarMSW::Layout(void)
node = node->Next();
}
if ( GetWindowStyleFlag() & wxTB_HORIZONTAL )
node = node->Next();
}
if ( GetWindowStyleFlag() & wxTB_HORIZONTAL )
+ {
m_maxWidth += maxToolWidth;
m_maxWidth += maxToolWidth;
+ m_maxHeight += maxToolHeight;
+ }
else
else
+ {
+ m_maxWidth += maxToolWidth;
m_maxHeight += maxToolHeight;
m_maxHeight += maxToolHeight;
+ }
m_maxWidth += m_xMargin;
m_maxHeight += m_yMargin;
m_maxWidth += m_xMargin;
m_maxHeight += m_yMargin;
+
+ SetSize(m_maxWidth, m_maxHeight);
}
}
@@
-935,7
+944,7
@@
WXHBITMAP wxToolBarMSW::CreateMappedBitmap(WXHINSTANCE WXUNUSED(hInstance), void
WXHBITMAP wxToolBarMSW::CreateMappedBitmap(WXHINSTANCE hInstance, WXHBITMAP hBitmap)
{
WXHBITMAP wxToolBarMSW::CreateMappedBitmap(WXHINSTANCE hInstance, WXHBITMAP hBitmap)
{
- HANDLE hDIB = BitmapToDIB((HBITMAP) hBitmap, 0);
+ HANDLE hDIB =
wx
BitmapToDIB((HBITMAP) hBitmap, 0);
if (hDIB)
{
#ifdef __WINDOWS_386__
if (hDIB)
{
#ifdef __WINDOWS_386__