Commit 8ea59326 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Use popup menu from shdoclc.dll.

parent de21efba
......@@ -49,6 +49,8 @@ HINSTANCE hInst;
LONG module_ref = 0;
DWORD mshtml_tls = 0;
static HINSTANCE shdoclc = NULL;
static void thread_detach(void)
{
thread_data_t *thread_data = get_thread_data(FALSE);
......@@ -62,6 +64,17 @@ static void thread_detach(void)
mshtml_free(thread_data);
}
HINSTANCE get_shdoclc(void)
{
static const WCHAR wszShdoclc[] =
{'s','h','d','o','c','l','c','.','d','l','l',0};
if(shdoclc)
return shdoclc;
return shdoclc = LoadLibraryExW(wszShdoclc, NULL, LOAD_LIBRARY_AS_DATAFILE);
}
BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
{
switch(fdwReason) {
......@@ -70,6 +83,8 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
break;
case DLL_PROCESS_DETACH:
close_gecko();
if(shdoclc)
FreeLibrary(shdoclc);
if(mshtml_tls)
TlsFree(mshtml_tls);
break;
......
......@@ -405,4 +405,6 @@ static inline BOOL mshtml_free(void *mem)
return HeapFree(GetProcessHeap(), 0, mem);
}
HINSTANCE get_shdoclc(void);
extern HINSTANCE hInst;
......@@ -272,7 +272,7 @@ void HTMLDocument_ShowContextMenu(HTMLDocument *This, DWORD dwID, POINT *ppt)
if(hres == S_OK)
return;
menu_res = LoadMenuW(hInst, MAKEINTRESOURCEW(IDR_BROWSE_CONTEXT_MENU));
menu_res = LoadMenuW(get_shdoclc(), MAKEINTRESOURCEW(IDR_BROWSE_CONTEXT_MENU));
menu = GetSubMenu(menu_res, dwID);
TrackPopupMenu(menu, TPM_LEFTALIGN | TPM_RIGHTBUTTON | TPM_RETURNCMD,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment