[EXPLORER] Enable _DEBUG and fix assertion failures (#4306)

- Enable _DEBUG if debugging.
- Fix assertion failures.
CORE-18013
This commit is contained in:
Katayama Hirofumi MZ 2022-01-24 10:26:13 +09:00 committed by GitHub
parent c262020016
commit d958950217
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 8 deletions

View file

@ -200,8 +200,10 @@ public:
VOID Initialize()
{
// HACK & FIXME: CORE-17505
SubclassWindow(m_hWnd);
// HACK & FIXME: CORE-18016
HWND hWnd = m_hWnd;
m_hWnd = NULL;
SubclassWindow(hWnd);
SetWindowTheme(m_hWnd, L"Start", NULL);
@ -216,8 +218,6 @@ public:
UpdateSize();
}
// Hack:
// Use DECLARE_WND_SUPERCLASS instead!
HWND Create(HWND hwndParent)
{
WCHAR szStartCaption[32];
@ -231,6 +231,7 @@ public:
DWORD dwStyle = WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | BS_PUSHBUTTON | BS_LEFT | BS_VCENTER;
// HACK & FIXME: CORE-18016
m_hWnd = CreateWindowEx(
0,
WC_BUTTON,
@ -3327,6 +3328,7 @@ public:
if (TrayWnd->m_TrayBandSite != NULL)
{
pcm.Release();
if (FAILED(TrayWnd->m_TrayBandSite->AddContextMenus(
hPopup,
indexMenu,
@ -3336,7 +3338,7 @@ public:
&pcm)))
{
WARN("AddContextMenus failed.\n");
pcm = NULL;
pcm.Release();
}
}