1.我的图标可以出现在“我的电脑”窗口,并且可以打开Windows Explorer。怎样才能在其它程序的“打开”对话框中不显示我的图标呢?GMail就能做到这样。2.怎样才能知道当前Windows Explorer左边的“浏览栏”的打开状态,比如搜索、文件夹、历史记录等。3.我可以在Windows Explorer的主菜单中添加自己的菜单,但是怎样才能在添加的菜单下面添加子菜单?4.我可以在Windows Explorer的工具栏中添加自己的下拉菜单的按钮,但是怎样才能添加该按钮的菜单?就像“查看”菜单一样。

解决方案 »

  1.   

    2.怎样才能知道当前Windows Explorer左边的“浏览栏”的打开状态,比如搜索、文件夹、历史记录等。在该IE窗体里查找标题:History的子窗体,找到说明历史记录是打开的。其他类似吧。
      

  2.   

    1 see How To Support Common Dialog Browsing in a Shell Namespace Extension(http://support.microsoft.com/kb/216954)
    2 For display/hide a band, see http://support.microsoft.com/kb/q255920. There is no documented method to determin the visibility of a band.
    3 handle QueryContextMenu 
    #define ID_MENU1        0 
    #define ID_MENU2        1 
    #define ID_MENU3        2 
    #define ID_MENU4        3 
    #define ID_LASTMENU     3 HMENU hPop = CreatePopupMenu(); 
    LoadString( g_hResInst, IDS_ITEM1, szMenuText, DIM(szMenuText) ); 
    InsertMenu( hPop, indexMenu, MenuItemFlags, idCmdFirst + ID_MENU1, 
    szMenuText ); 
    indexMenu++; 
    ... repeat the last 3 lines for other menu items 
    /* Add the popup to the main menu */ 
    /* Now do it this way to work around quirk noted in KB article Q214477 
    */ 
    MENUITEMINFO mii; 
    mii.cbSize = sizeof( mii ); 
    mii.fMask = MIIM_SUBMENU | MIIM_ID | MIIM_TYPE; 
    mii.fType = MFT_STRING; 
    mii.hSubMenu = hPop; 
    mii.wID = idCmdFirst + ID_MENU4; 
    mii.dwTypeData = _T("Popup"); 
    mii.cch = sizeof("Popup")-1;  // Shouldn't be needed, but works 
    around an MSLU bug 
    /* This currently fails (as does the ANSI version) under Win95, so 
    check failure and then use the old method */ 
    if ( !InsertMenuItem( hMenu, indexMenu, true, &mii ) ) 

            InsertMenu( hMenu, indexMenu, MF_STRING | MF_BYPOSITION | 
    MF_POPUP, (UINT_PTR) hPop, _T("Popup") ); 

    indexMenu++; Note:
    The Command ID's may be out of range.4 http://www.codeproject.com/wtl/toolband.asp
      

  3.   

    谢谢老大,能否用中文具体的说一下呢?
    我的e文水平根本看不懂您给的那些网页,另外我仅会vb语言,c系列的根本看不懂。苦恼啊...
    我想要vb的示例代码看看(有点得寸进尺哦)
      

  4.   

    放分第2贴:本贴为第1贴的加分贴。http://community.csdn.net/Expert/topic/4574/4574733.xml?temp=.4973871
      

  5.   

    Sorry, I am not good at vb.
      

  6.   

    对shell extension的VB实现研究的不多,你可以参考:
    http://www.mvps.org/emorcillo/en/code/shell/shellextensions.shtml这个网站:
    http://www.mvps.org/emorcillo 有很多shell方面的代码
      

  7.   

    Sorry, this computer does not have a Chinese Input Method installed.
      

  8.   

    Sorry, this computer does not have a Chinese Input Method installed.
      

  9.   

    感谢楼上两位老大mvps的那个我前段时间看过了。vb的这方面资料的确很少啊。
    继续等待....
      

  10.   

    建议用VC或者Delphi,VB开发这个确实不是很合适。
      

  11.   

    http://examples.oreilly.com/vbshell/vbshell_examples.zip
      

  12.   

    资料建议看《Visual Basic Shell Programming》,网上可以找到电子版,找不着告诉我一下,我发给你
      

  13.   

    暴风雨老大好,我还真没找到《Visual Basic Shell Programming》电子书,该书是中文版吗?
    如果方便请给我个下载地址,谢谢。
    稍后结贴。
      

  14.   

    2.
    Private Declare Function GetWindowRect Lib "user32" (ByVal hwnd As Long, lpRect As RECT) As LongDim RC As RECT
    GetWindowRect Me.hwnd, RC
    '判断RC.left > 20
      

  15.   

    //我还真没找到《Visual Basic Shell Programming》电子书,该书是中文版吗这本书没有中文版,不过该书是一本好书,英文不好的话,可以查字典慢慢看,会有收获的,你的问题我想你应该重点看一下第11章(Chapter 11. Namespace Extensions)至于下载地址,它已经失效了,不想公布email的话,可以给我发站内短消息
      

  16.   

    谢谢老大
    短信已发
    另外请关注一下第2贴,这个好像在示例中没有涉及到。
    http://community.csdn.net/Expert/topic/4574/4574733.xml?temp=.4973871