projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
use solid bacgkround for static box as pattern brush can't be properly aligned when...
[wxWidgets.git]
/
src
/
msw
/
listctrl.cpp
diff --git
a/src/msw/listctrl.cpp
b/src/msw/listctrl.cpp
index 4347b8482002cfc102855ef63c865ef4b8a06198..0d5621a969a2bb22e01cf19d518a4debe8158f77 100644
(file)
--- a/
src/msw/listctrl.cpp
+++ b/
src/msw/listctrl.cpp
@@
-113,16
+113,16
@@
public:
m_pItem = &item;
}
m_pItem = &item;
}
- // memcpy() in Init() can't work if the struct sizes are different
- wxCOMPILE_TIME_ASSERT( sizeof(LV_ITEM_OTHER) == sizeof(LV_ITEM_NATIVE),
- CodeCantWorkIfDiffSizes);
-
// init with conversion
void Init(LV_ITEM_OTHER& item)
{
// avoid unnecessary dynamic memory allocation, jjust make m_pItem
// point to our own m_item
// init with conversion
void Init(LV_ITEM_OTHER& item)
{
// avoid unnecessary dynamic memory allocation, jjust make m_pItem
// point to our own m_item
+ // memcpy() can't work if the struct sizes are different
+ wxCOMPILE_TIME_ASSERT( sizeof(LV_ITEM_OTHER) == sizeof(LV_ITEM_NATIVE),
+ CodeCantWorkIfDiffSizes);
+
memcpy(&m_item, &item, sizeof(LV_ITEM_NATIVE));
// convert text from ANSI to Unicod if necessary
memcpy(&m_item, &item, sizeof(LV_ITEM_NATIVE));
// convert text from ANSI to Unicod if necessary
@@
-480,6
+480,8
@@
void wxListCtrl::FreeAllInternalData()
m_ignoreChangeMessages = false;
m_AnyInternalData = false;
m_ignoreChangeMessages = false;
m_AnyInternalData = false;
+
+ m_count = 0;
}
}
}
}
@@
-1917,7
+1919,6
@@
bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
break;
case LVN_DELETEALLITEMS:
break;
case LVN_DELETEALLITEMS:
- m_count = 0;
eventType = wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS;
event.m_itemIndex = -1;
break;
eventType = wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS;
event.m_itemIndex = -1;
break;