mirror of
https://github.com/reactos/reactos.git
synced 2024-10-22 05:46:19 +00:00
[EXPLORER]
- Fix taskbar icons svn path=/trunk/; revision=58286
This commit is contained in:
parent
4bc787a402
commit
b0eb2fb598
|
@ -516,14 +516,17 @@ void TaskBar::Refresh()
|
||||||
for(set<int>::reverse_iterator it=btn_idx_to_delete.rbegin(); it!=btn_idx_to_delete.rend(); ++it) {
|
for(set<int>::reverse_iterator it=btn_idx_to_delete.rbegin(); it!=btn_idx_to_delete.rend(); ++it) {
|
||||||
int idx = *it;
|
int idx = *it;
|
||||||
|
|
||||||
SendMessage(_htoolbar, TB_DELETEBUTTON, idx, 0);
|
if (!SendMessage(_htoolbar, TB_DELETEBUTTON, idx, 0))
|
||||||
|
MessageBoxW(NULL, L"failed to delete button", NULL, MB_OK);
|
||||||
|
|
||||||
for(TaskBarMap::iterator it=_map.begin(); it!=_map.end(); ++it) {
|
|
||||||
TaskBarEntry& entry = it->second;
|
for(TaskBarMap::iterator it2=_map.begin(); it2!=_map.end(); ++it2) {
|
||||||
|
TaskBarEntry& entry = it2->second;
|
||||||
|
|
||||||
// adjust button indexes
|
// adjust button indexes
|
||||||
if (entry._btn_idx > idx) {
|
if (entry._btn_idx > idx) {
|
||||||
--entry._btn_idx;
|
--entry._btn_idx;
|
||||||
|
#if 0
|
||||||
--entry._bmp_idx;
|
--entry._bmp_idx;
|
||||||
|
|
||||||
TBBUTTONINFO info;
|
TBBUTTONINFO info;
|
||||||
|
@ -532,17 +535,20 @@ void TaskBar::Refresh()
|
||||||
info.dwMask = TBIF_IMAGE;
|
info.dwMask = TBIF_IMAGE;
|
||||||
info.iImage = entry._bmp_idx;
|
info.iImage = entry._bmp_idx;
|
||||||
|
|
||||||
SendMessage(_htoolbar, TB_SETBUTTONINFO, entry._id, (LPARAM)&info);
|
if (!SendMessage(_htoolbar, TB_SETBUTTONINFO, entry._id, (LPARAM)&info))
|
||||||
|
MessageBoxW(NULL, L"failed to set button info", NULL, MB_OK);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for(set<HBITMAP>::iterator it=hbmp_to_delete.begin(); it!=hbmp_to_delete.end(); ++it) {
|
for(set<HBITMAP>::iterator it=hbmp_to_delete.begin(); it!=hbmp_to_delete.end(); ++it) {
|
||||||
HBITMAP hbmp = *it;
|
HBITMAP hbmp = *it;
|
||||||
|
#if 0
|
||||||
TBREPLACEBITMAP tbrepl = {0, (UINT_PTR)hbmp, 0, 0};
|
TBREPLACEBITMAP tbrepl = {0, (UINT_PTR)hbmp, 0, 0};
|
||||||
SendMessage(_htoolbar, TB_REPLACEBITMAP, 0, (LPARAM)&tbrepl);
|
SendMessage(_htoolbar, TB_REPLACEBITMAP, 0, (LPARAM)&tbrepl);
|
||||||
|
#endif
|
||||||
DeleteObject(hbmp);
|
DeleteObject(hbmp);
|
||||||
|
|
||||||
for(TaskBarMap::iterator it=_map.begin(); it!=_map.end(); ++it)
|
for(TaskBarMap::iterator it=_map.begin(); it!=_map.end(); ++it)
|
||||||
|
|
Loading…
Reference in a new issue