提交 cb3c4b14 编写于 作者: D dcherepanov

6582346: javaw launcher does not display MessageBox after change to the resource files

Summary: call InitCommonControlsEx to perform UI initialization
Reviewed-by: art
上级 80cfc946
......@@ -49,6 +49,9 @@ void ComCtl32Util::InitLibraries() {
m_bNewSubclassing = (m_lpfnSetWindowSubclass != NULL) &&
(m_lpfnRemoveWindowSubclass != NULL) &&
(m_lpfnDefSubclassProc != NULL);
fn_InitCommonControlsEx = (ComCtl32Util::InitCommonControlsExType)::GetProcAddress(hModComCtl32, "InitCommonControlsEx");
InitCommonControls();
}
}
}
......@@ -108,3 +111,15 @@ LRESULT ComCtl32Util::SharedWindowProc(HWND hwnd, UINT msg,
CATCH_BAD_ALLOC_RET(0);
}
void ComCtl32Util::InitCommonControls()
{
if (fn_InitCommonControlsEx == NULL) {
return;
}
INITCOMMONCONTROLSEX iccex;
memset(&iccex, 0, sizeof(INITCOMMONCONTROLSEX));
iccex.dwSize = sizeof(INITCOMMONCONTROLSEX);
fn_InitCommonControlsEx(&iccex);
}
......@@ -25,6 +25,8 @@
#include "awt_Component.h"
#include <commctrl.h>
#ifndef _COMCTL32UTIL_H
#define _COMCTL32UTIL_H
......@@ -81,6 +83,11 @@ class ComCtl32Util
PFNREMOVEWINDOWSUBCLASS m_lpfnRemoveWindowSubclass;
PFNDEFSUBCLASSPROC m_lpfnDefSubclassProc;
typedef BOOL (WINAPI * InitCommonControlsExType)(const LPINITCOMMONCONTROLSEX lpInitCtrls);
InitCommonControlsExType fn_InitCommonControlsEx;
void InitCommonControls();
BOOL m_bNewSubclassing;
// comctl32.dll version 6 window proc
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册