mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 00:45:43 +00:00
[EXPLORER] Enable _DEBUG and fix assertion failures (#4306)
- Enable _DEBUG if debugging. - Fix assertion failures. CORE-18013
This commit is contained in:
parent
c262020016
commit
d958950217
4 changed files with 17 additions and 8 deletions
|
@ -9,6 +9,10 @@
|
||||||
#define WIN7_COMPAT_MODE 1
|
#define WIN7_COMPAT_MODE 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if DBG && !defined(_DEBUG)
|
||||||
|
#define _DEBUG // CORE-17505
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <tchar.h>
|
#include <tchar.h>
|
||||||
|
|
||||||
|
|
|
@ -1231,8 +1231,10 @@ void CNotifyToolbar::Initialize(HWND hWndParent, CBalloonQueue * queue)
|
||||||
TBSTYLE_FLAT | TBSTYLE_TOOLTIPS | TBSTYLE_WRAPABLE | TBSTYLE_TRANSPARENT |
|
TBSTYLE_FLAT | TBSTYLE_TOOLTIPS | TBSTYLE_WRAPABLE | TBSTYLE_TRANSPARENT |
|
||||||
CCS_TOP | CCS_NORESIZE | CCS_NOPARENTALIGN | CCS_NODIVIDER;
|
CCS_TOP | CCS_NORESIZE | CCS_NOPARENTALIGN | CCS_NODIVIDER;
|
||||||
|
|
||||||
// HACK & FIXME: CORE-17505
|
// HACK & FIXME: CORE-18016
|
||||||
SubclassWindow(CToolbar::Create(hWndParent, styles));
|
HWND hwnd = CToolbar::Create(hWndParent, styles);
|
||||||
|
m_hWnd = NULL;
|
||||||
|
SubclassWindow(hwnd);
|
||||||
|
|
||||||
// Force the toolbar tooltips window to always show tooltips even if not foreground
|
// Force the toolbar tooltips window to always show tooltips even if not foreground
|
||||||
HWND tooltipsWnd = (HWND)SendMessageW(TB_GETTOOLTIPS);
|
HWND tooltipsWnd = (HWND)SendMessageW(TB_GETTOOLTIPS);
|
||||||
|
|
|
@ -285,9 +285,10 @@ public:
|
||||||
TBSTYLE_TOOLTIPS | TBSTYLE_WRAPABLE | TBSTYLE_LIST | TBSTYLE_TRANSPARENT |
|
TBSTYLE_TOOLTIPS | TBSTYLE_WRAPABLE | TBSTYLE_LIST | TBSTYLE_TRANSPARENT |
|
||||||
CCS_TOP | CCS_NORESIZE | CCS_NODIVIDER;
|
CCS_TOP | CCS_NORESIZE | CCS_NODIVIDER;
|
||||||
|
|
||||||
|
// HACK & FIXME: CORE-18016
|
||||||
HWND toolbar = CToolbar::Create(hWndParent, styles);
|
HWND toolbar = CToolbar::Create(hWndParent, styles);
|
||||||
SetDrawTextFlags(DT_NOPREFIX, DT_NOPREFIX);
|
SetDrawTextFlags(DT_NOPREFIX, DT_NOPREFIX);
|
||||||
// HACK & FIXME: CORE-17505
|
m_hWnd = NULL;
|
||||||
return SubclassWindow(toolbar);
|
return SubclassWindow(toolbar);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -200,8 +200,10 @@ public:
|
||||||
|
|
||||||
VOID Initialize()
|
VOID Initialize()
|
||||||
{
|
{
|
||||||
// HACK & FIXME: CORE-17505
|
// HACK & FIXME: CORE-18016
|
||||||
SubclassWindow(m_hWnd);
|
HWND hWnd = m_hWnd;
|
||||||
|
m_hWnd = NULL;
|
||||||
|
SubclassWindow(hWnd);
|
||||||
|
|
||||||
SetWindowTheme(m_hWnd, L"Start", NULL);
|
SetWindowTheme(m_hWnd, L"Start", NULL);
|
||||||
|
|
||||||
|
@ -216,8 +218,6 @@ public:
|
||||||
UpdateSize();
|
UpdateSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Hack:
|
|
||||||
// Use DECLARE_WND_SUPERCLASS instead!
|
|
||||||
HWND Create(HWND hwndParent)
|
HWND Create(HWND hwndParent)
|
||||||
{
|
{
|
||||||
WCHAR szStartCaption[32];
|
WCHAR szStartCaption[32];
|
||||||
|
@ -231,6 +231,7 @@ public:
|
||||||
|
|
||||||
DWORD dwStyle = WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | BS_PUSHBUTTON | BS_LEFT | BS_VCENTER;
|
DWORD dwStyle = WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | BS_PUSHBUTTON | BS_LEFT | BS_VCENTER;
|
||||||
|
|
||||||
|
// HACK & FIXME: CORE-18016
|
||||||
m_hWnd = CreateWindowEx(
|
m_hWnd = CreateWindowEx(
|
||||||
0,
|
0,
|
||||||
WC_BUTTON,
|
WC_BUTTON,
|
||||||
|
@ -3327,6 +3328,7 @@ public:
|
||||||
|
|
||||||
if (TrayWnd->m_TrayBandSite != NULL)
|
if (TrayWnd->m_TrayBandSite != NULL)
|
||||||
{
|
{
|
||||||
|
pcm.Release();
|
||||||
if (FAILED(TrayWnd->m_TrayBandSite->AddContextMenus(
|
if (FAILED(TrayWnd->m_TrayBandSite->AddContextMenus(
|
||||||
hPopup,
|
hPopup,
|
||||||
indexMenu,
|
indexMenu,
|
||||||
|
@ -3336,7 +3338,7 @@ public:
|
||||||
&pcm)))
|
&pcm)))
|
||||||
{
|
{
|
||||||
WARN("AddContextMenus failed.\n");
|
WARN("AddContextMenus failed.\n");
|
||||||
pcm = NULL;
|
pcm.Release();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue