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; ...@@ -49,6 +49,8 @@ HINSTANCE hInst;
LONG module_ref = 0; LONG module_ref = 0;
DWORD mshtml_tls = 0; DWORD mshtml_tls = 0;
static HINSTANCE shdoclc = NULL;
static void thread_detach(void) static void thread_detach(void)
{ {
thread_data_t *thread_data = get_thread_data(FALSE); thread_data_t *thread_data = get_thread_data(FALSE);
...@@ -62,6 +64,17 @@ static void thread_detach(void) ...@@ -62,6 +64,17 @@ static void thread_detach(void)
mshtml_free(thread_data); 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) BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
{ {
switch(fdwReason) { switch(fdwReason) {
...@@ -70,6 +83,8 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv) ...@@ -70,6 +83,8 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
break; break;
case DLL_PROCESS_DETACH: case DLL_PROCESS_DETACH:
close_gecko(); close_gecko();
if(shdoclc)
FreeLibrary(shdoclc);
if(mshtml_tls) if(mshtml_tls)
TlsFree(mshtml_tls); TlsFree(mshtml_tls);
break; break;
......
...@@ -405,4 +405,6 @@ static inline BOOL mshtml_free(void *mem) ...@@ -405,4 +405,6 @@ static inline BOOL mshtml_free(void *mem)
return HeapFree(GetProcessHeap(), 0, mem); return HeapFree(GetProcessHeap(), 0, mem);
} }
HINSTANCE get_shdoclc(void);
extern HINSTANCE hInst; extern HINSTANCE hInst;
...@@ -272,7 +272,7 @@ void HTMLDocument_ShowContextMenu(HTMLDocument *This, DWORD dwID, POINT *ppt) ...@@ -272,7 +272,7 @@ void HTMLDocument_ShowContextMenu(HTMLDocument *This, DWORD dwID, POINT *ppt)
if(hres == S_OK) if(hres == S_OK)
return; 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); menu = GetSubMenu(menu_res, dwID);
TrackPopupMenu(menu, TPM_LEFTALIGN | TPM_RIGHTBUTTON | TPM_RETURNCMD, 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