How to Add a Custom Find Utility to the Start Menu

Last reviewed: March 28, 1996
Article ID: Q135986
The information in this article applies to:
  • Microsoft Win32 Application Programming Interface (API) included with:

        - Microsoft Windows 95 version 4.0
    

SUMMARY

In Windows 95, you can have a program create a custom Find utility for the Start Menu. For an example, look at how The Microsoft Network adds a custom Find "On the Microsoft Network..." option to Windows 95 when the user signs up on The Microsoft Network.

MORE INFORMATION

The first step to registering a custom Find utility is to implement a shell context menu extension that supplies the menu item. The handler's IContextMenu::InvokeCommand() member will be called whenever the user selects the custom Find utility on the Start Menu.

The context menu extension can be registered by adding some information for the handler to the following key in the registry:

    \HKEY_LOCAL_MACHINE
        \Software
            \Microsoft
                \Windows
                    \CurrentVersion
                        \Explorer
                            \FindExtensions
                                \Static

Under this key, your program needs to add a key, such as MyFind, for the context menu extension that contains the GUID for the context menu handler. Under MyFind, your program needs to create a second key "0" that contains the text of the menu item you want to include. Finally, under the "0" key, you need to create a third key "DefaultIcon" that contains the name of a .dll file that contains the icon you want displayed on the menu and the index of the icon in that .dll file.

To summarize, you need to add the following under the ..\FindExtensions\Static key in the registry:

    \MyFind = <GUID>
        \0 = <Text for the menu item>
            \DefaultIcon = <path to dll, index of icon in dll>

The context menu handler must also be registered normally as documented in the Win32 SDK.

REFERENCES

You can find additional information on writing context menu handlers in:

  • The Win32 SDK's "Programmer's Guide to Windows 95" on MSDN.
  • Nancy Clut's book "Programming the Windows 95 UI."
  • Jeff Prosise's March 1995 MSJ article "Writing Windows 95 Shell Extensions."


Additional reference words: 4.00 Windows 95
KBCategory: kbui
KBSubcategory: UsrShell


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: March 28, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.