Microsoft Developer Network > 포럼 홈 > Visual C++ General > shdoclc.dll missing when trying to customize WebBrowser control context menu
질문하기질문하기
 

답변됨shdoclc.dll missing when trying to customize WebBrowser control context menu

  • 2009년 2월 2일 월요일 오후 4:29Jonas Nordlund 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    I'm not sure when it went M.I.A. but suddenly, now when I'm on Windows Vista 64-bit (Swedish) and Internet Explorer 8 RC, I don't have it in %WINDIR%\System32 at least.

    This causes a problem in our application that attempt to customize the context menu in a hosted WebBrowser control. It is supposed to load that DLL, and next its IE menu resource, and then get a handle to it and customize it. But now with the DLL entirely missing I'm stopped early in my tracks. :S

    Why could it be that I don't have that DLL? Can I just get it from someone else? Do IE 8 (or already 7?) no longer use it? I'm not quite sure when this happened because our app silently caught the problem, and I haven't tried using the context menu until now. ;)

    TIA

    Jonas

답변

  • 2009년 2월 2일 월요일 오후 6:13Sheng Jiang 蒋晟MVP사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     답변됨

    The DLL disappears after the IE upgrade. Loading resources from Windows Dlls is not supported. Whoever invented the hack in the WebBrowser Customization article needs to update the page to include a warning that the hack may stop working without notice. 


    In Internet Explorer 7, the technique for overriding the context menu from a DocObject host is the same as Internet Explorer 6; however, the host must implement its own menu resources. The internal resources of Internet Explorer should not be used as they may change or move (as has been done in Internet Explorer 7). See Appending Extensions to Your Custom Menu below.

    MSMVP VC++
    • 답변으로 표시됨Jonas Nordlund 2009년 2월 2일 월요일 오후 10:18
    •  

모든 응답

  • 2009년 2월 2일 월요일 오후 5:56nobugzMVP, 중재자사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    Is it because you should look in the c:\windows\syswow64 directory instead?
    Hans Passant.
  • 2009년 2월 2일 월요일 오후 6:13Sheng Jiang 蒋晟MVP사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     답변됨

    The DLL disappears after the IE upgrade. Loading resources from Windows Dlls is not supported. Whoever invented the hack in the WebBrowser Customization article needs to update the page to include a warning that the hack may stop working without notice. 


    In Internet Explorer 7, the technique for overriding the context menu from a DocObject host is the same as Internet Explorer 6; however, the host must implement its own menu resources. The internal resources of Internet Explorer should not be used as they may change or move (as has been done in Internet Explorer 7). See Appending Extensions to Your Custom Menu below.

    MSMVP VC++
    • 답변으로 표시됨Jonas Nordlund 2009년 2월 2일 월요일 오후 10:18
    •  
  • 2009년 2월 2일 월요일 오후 10:18Jonas Nordlund 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    Alright, thanks! Yes, the technique always felt quite "hacky" to me, although I believe I learnt it from that article, with the #define for IDR_BROWSE_CONTEXT_MENU and all. ;) Hmm, I'll look around as for how to add our "personal" menu with "View source", "Print" and "Page properties" commands then. Earlier, we took the IE menu and removed all items we didn't want, essentially just leaving those.