View Full Version : adding search to classic menu
rtdos
January 8th 04, 07:59 PM
I'd like to add a link to a search engine (such as Google or Yahoo) to the
search folder on my classic start menu, but can't find a reference anywhere.
Where should I look ?
--
* REPLY REQUESTED WHEN CONVENIENT *
Woodzy
(netscape community webring)
http://l.webring.com/hub?ring=netscape
Kelly
January 8th 04, 08:00 PM
Start here: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\
CurrentVersion\Explorer\FindExtensions\Static\Shel lSearch
--
Happy Holidays,
Kelly
MS-MVP Win98/XP
[AE-Windows® XP]
Troubleshooting Windows XP
http://www.kellys-korner-xp.com
Repair/Customize Quick Launch, Taskbar and Notification Area
http://www.kellys-korner-xp.com/taskbarplus!.htm
Registry Edits, Tips and Tricks for XP
http://www.kellys-korner-xp.com/xp_tweaks.htm
"rtdos" > wrote in message
news:IOxBb.496074$Fm2.478314@attbi_s04...
> I'd like to add a link to a search engine (such as Google or Yahoo) to the
> search folder on my classic start menu, but can't find a reference
anywhere.
>
> Where should I look ?
>
>
> --
> * REPLY REQUESTED WHEN CONVENIENT *
>
> Woodzy
> (netscape community webring)
> http://l.webring.com/hub?ring=netscape
>
>
>
john
January 8th 04, 08:00 PM
Why not do what I have done.
Open Google in IE & drag the URL down to the Quick Launch tray.
I always use that to open IE & have my 'Home' button set to my normal ISP
home page.
--
John
> I'd like to add a link to a search engine (such as Google or Yahoo) to
> the search folder on my classic start menu, but can't find a reference
> anywhere.
>
> Where should I look ?
>
>
> --
> * REPLY REQUESTED WHEN CONVENIENT *
>
> Woodzy
> (netscape community webring)
> http://l.webring.com/hub?ring=netscape
David Candy
January 8th 04, 08:00 PM
Creating Search Handlers
The Shell supports several search utilities that allow users to locate =
namespace objects such as files or printers. You can create a custom =
search engine and make it available to users by implementing and =
registering a search handler.
The general procedures for implementing and registering a Shell =
extension handler are discussed in Creating Shell Extension Handlers. =
This document focuses on those aspects of implementation that are =
specific to search handlers.
a.. How Search Handlers Work=20
b.. Registering Search Handlers=20
c.. Implementing Search Handlers=20
How Search Handlers Work
Users have two ways to select a search engine. The first way is from the =
Start menu. With systems earlier than Microsoft=AE Windows=AE 2000, =
selecting the Find command on the Start menu displays a submenu of the =
available search engines. With Windows 2000 and later, the Start menu's =
Find command is renamed Search. The following illustration shows the =
Search button on a Microsoft=AE Windows=AE XP system.
=20
Users can also launch a search from Windows Explorer. On systems earlier =
than Windows 2000, they click the Find command on the Tools menu to =
display essentially the same menu as the one associated with the Start =
menu. However, Windows Explorer for Windows 2000 and later handles =
search engines in a very different way. Instead of handling search =
engines as a submenu of the Tools menu, there is now a Search button on =
the toolbar. Clicking this button opens the Explorer bar's Search pane. =
The following illustration shows the search pane.
=20
There are a number of differences in how Windows 2000 and later systems =
manage search handlers. These differences affect both implementation and =
registration.
Pre-Windows 2000 Windows 2000 and later=20
Search handlers are implemented as a type of shortcut menu =
handler. Search handlers can be implemented as shortcut menu handlers, =
or as DHTML documents.=20
Search handlers can be either static or dynamic. Static handlers =
are loaded only when they are selected by the user. Dynamic handlers are =
loaded by the Shell at startup and are not terminated until the Shell =
exits. Handlers implemented as shortcut menu handlers can be either =
static or dynamic. Handlers implemented as DHTML documents must be =
static.=20
Search handlers appear on the Find submenu of the Start menu and =
the Find submenu of the Windows Explorer Tools menu. Search handlers =
appear only on the Search submenu of the Start menu. To make a custom =
search pane available through the Windows Explorer menu bar, you must =
implement it as a band object. It is then listed on the Explorer Bar =
submenu of the Windows Explorer View menu.=20
Registering Search Handlers
Search handlers are registered under the file class's =
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Curr entVersion\Explorer\Fin=
dExtensions subkey. From this point, the registration procedure depends =
on whether the handler is to be static or dynamic. For a general =
discussion of how to register Shell extension handlers, see Creating =
Shell Extension Handlers.
Registering a Static Search Handler
Static search handlers are loaded only when they are launched by the =
user. This approach works best for DLLs that are small and can be loaded =
quickly. If you are using DHTML to implement your handler, it must be =
static. To register a static extension handler, create a subkey named =
for the handler under the Static subkey of the FindExtensions subkey. =
The name is not used by the system, but it must not be identical to =
other search handler names under the FindExtensions subkey.
Shortcut menu-based search handlers
If your handler is implemented as a shortcut menu handler, set the =
default value of the handler's name subkey to the object's CLSID GUID. =
Under the handler's name subkey, create a subkey named 0 (zero) and set =
its default value to the string that will be displayed in the Search or =
Find submenu. You can enable keyboard shortcuts in the usual way, by =
preceding the shortcut character with an ampersand (&). You can have an =
optional small icon displayed to the right of the menu text by creating =
a DefaultIcon subkey under the 0 subkey. Set its default value to a =
string containing the path of the file containing the icon, followed by =
a comma, followed by the icon's zero-based index.=20
The following example registers the MySearchEngine search handler. The =
menu text is "My Search Engine", with M specified as the shortcut key. =
The icon is in C:\MyDir\MySearch.dll, with an index of 2.
HKEY_LOCAL_MACHINE
Software
Microsoft
Windows
CurrentVersion
Explorer
FindExtensions
Static
MySearchEngine=3D{MySearchEngine CLSID GUID}
0=3D&My Search Engine
DefaultIcon=3Dc:\MyDir\MySearch.dll,2
DHTML-based search handlers
With Windows 2000, you can also implement a search handler as a DHTML =
document. Its name is listed in the Search submenu of the Start menu. =
When the user selects it, it launches Windows Explorer with the Explorer =
bar opened to the search document. You can also specify a DHTML document =
to be displayed to the right of the Explorer bar. There is no way to =
launch a third party handler from the default Search pane. Search =
engines can be launched directly from Windows Explorer, but only if they =
are implemented as as band objects.
To register a DHTML-based search handler, set the handler's name subkey =
to the string form of CLSID_ShellSearchExt (currently =
{169A0691-8DF9-11d1-A1C4-00C04FD75D13}) and create the following =
subkeys:=20
1.. Create a 0 (zero) subkey under the name subkey and set its default =
value to the menu text.=20
2.. To have an icon displayed next to the menu text, create a =
DefaultIcon subkey under 0 and set its default value to the icon's path =
and index.=20
3.. Create a SearchGUID subkey under 0. Assign a GUID to the DHTML =
document and set the default value of SearchGUID to its string form. =
This GUID does not need to be registered under HKEY_CLASSES_ROOT\CLSID.=20
4.. Create a Url subkey under SearchGUID. Set its default value to the =
path of the HTM document that will appear in the Explorer bar.=20
5.. Create a UrlNavNew subkey under SearchGUID. Set its default value =
to the path of the HTML document that will appear to the right of the =
Explorer bar.=20
The following example registers the MySearchEngine search handler =
implemented as a DHTML document. The menu text is "My Search Engine", =
with M specified as the shortcut key. The icon is in =
C:\MyDir\MySearch.dll, with an index of 2. The Explorer bar's DHTML =
document is C:\MyDir\MySearch.htm, and the document that will be =
displayed to the right of the Explorer bar is C:\MyDir\MySearchPage.htm.
HKEY_LOCAL_MACHINE
Software
Microsoft
Windows
CurrentVersion
Explorer
FindExtensions
Static
MySearchEngine=3D{169A0691-8DF9-11d1-A1C4-00C04FD75D13}
0=3D&My Search Engine
DefaultIcon=3Dc:\MyDir\MySearch.dll,2
SearchGUID=3D{My Search GUID}
Url=3DC:\MyDir\MySearch.htm
UrlNavNew=3D\MyDir\MySearchPage.htm
Registering a Dynamic Search Handler
If your handler is implemented as a shortcut menu handler, you can also =
register it as a dynamic handler. In that case, it will be loaded with =
the Shell and will terminate only when the Shell exits. Dynamic search =
handlers respond much more quickly than static handlers when they are =
launched by the user. This approach works best if your handler's DLL =
might take a long time to load, or if it is likely to be called =
frequently.
Dynamic search handlers are registered under the =
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Curr entVersion\Explorer\Fin=
dExtensions subkey. Create a subkey of FindExtensions named for the =
handler, and set its default value to the handler's CLSID GUID. Menu =
icons are not supported for dynamic search handlers. The following =
example registers MySearchEngine as a dynamic search handler.
HKEY_LOCAL_MACHINE
Software
Microsoft
Windows
CurrentVersion
Explorer
FindExtensions
MySearchEngine=3D{MySearchEngine CLSID GUID}
0=3D&My Search Engine
Unlike static search handlers, you do not specify the menu text in the =
registry. When the handler is loaded, the Shell will call the handler's =
IContextMenu::QueryContextMenu method to add items to the Find or Search =
submenu.
Implementing Search Handlers
Search handlers can be implemented as shortcut menu handlers for all =
versions of Windows. For Windows 2000, they can also be implemented as =
DHTML documents.
For a general discussion of how to implement shortcut menu handlers, see =
Creating Shortcut Menu Handlers. Search handlers differ from standard =
shortcut menu handlers in only a few ways.
For static menu handlers, the Find or Search submenu is created from the =
information in the registry. There is no need to have the handler add a =
menu item, as a normal shortcut menu handler would. The Shell manages =
static menu handlers in the following way:
a.. When the user launches the handler's menu item, the Shell loads =
the handler's DLL and calls IContextMenu::InvokeCommand to notify the =
handler to launch the search engine. The IShellExtInit::Initialize and =
IContextMenu::QueryContextMenu methods are not called.=20
b.. When IContextMenu::InvokeCommand is called, the lpVerb member of =
the CMINVOKECOMMANDINFO structure that is passed in identifies the =
command. The low-order word of lpVerb is set to the numerical equivalent =
of the command's subkey name. Since this subkey is normally named 0, =
lpVerb is usually set to zero. The handler should then launch the search =
engine.=20
Dynamic search handlers are implemented in much the same way as normal =
shortcut menu handlers. The primary exception is that when =
IShellExtInit::Initialize is called, the pidlFolder and lpdobj arguments =
are set to NULL.
DHTML-based search handlers are implemented as a normal DHTML document. =
They can include any HTML, DHTML, or scripting technology that is =
supported by Microsoft=AE Internet Explorer.
--=20
----------------------------------------------------------
http://www.g2mil.com/Dec2003.htm
"Kelly" > wrote in message =
...
> Start here: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\
> CurrentVersion\Explorer\FindExtensions\Static\Shel lSearch
>=20
> --=20
> Happy Holidays,
> Kelly
>=20
> MS-MVP Win98/XP
> [AE-Windows=AE XP]
>=20
> Troubleshooting Windows XP
> http://www.kellys-korner-xp.com
>=20
> Repair/Customize Quick Launch, Taskbar and Notification Area
> http://www.kellys-korner-xp.com/taskbarplus!.htm
>=20
> Registry Edits, Tips and Tricks for XP
> http://www.kellys-korner-xp.com/xp_tweaks.htm
>=20
>=20
> "rtdos" > wrote in message
> news:IOxBb.496074$Fm2.478314@attbi_s04...
> > I'd like to add a link to a search engine (such as Google or Yahoo) =
to the
> > search folder on my classic start menu, but can't find a reference
> anywhere.
> >
> > Where should I look ?
> >
> >
> > --=20
> > * REPLY REQUESTED WHEN CONVENIENT *
> >
> > Woodzy
> > (netscape community webring)
> > http://l.webring.com/hub?ring=3Dnetscape
> >
> >
> >
>=20
john
January 8th 04, 08:00 PM
Sure you're finished, David? Been on the Bundy again! :-)
--
John
> Creating Search Handlers
> The Shell supports several search utilities that allow users to locate
> namespace objects such as files or printers. You can create a custom
> search engine and make it available to users by implementing and
> registering a search handler.
>
> The general procedures for implementing and registering a Shell
> extension handler are discussed in Creating Shell Extension Handlers.
> This document focuses on those aspects of implementation that are
> specific to search handlers.
>
> a.. How Search Handlers Work
> b.. Registering Search Handlers
> c.. Implementing Search Handlers
> How Search Handlers Work
> Users have two ways to select a search engine. The first way is from
> the Start menu. With systems earlier than Microsoft® Windows® 2000,
> selecting the Find command on the Start menu displays a submenu of the
> available search engines. With Windows 2000 and later, the Start menu's
> Find command is renamed Search. The following illustration shows the
> Search button on a Microsoft® Windows® XP system.
>
>
> Users can also launch a search from Windows Explorer. On systems
> earlier than Windows 2000, they click the Find command on the Tools
> menu to display essentially the same menu as the one associated with
> the Start menu. However, Windows Explorer for Windows 2000 and later
> handles search engines in a very different way. Instead of handling
> search engines as a submenu of the Tools menu, there is now a Search
> button on the toolbar. Clicking this button opens the Explorer bar's
> Search pane. The following illustration shows the search pane.
>
>
> There are a number of differences in how Windows 2000 and later systems
> manage search handlers. These differences affect both implementation
> and registration.
>
> Pre-Windows 2000 Windows 2000 and later
> Search handlers are implemented as a type of shortcut menu
> handler. Search handlers can be implemented as shortcut menu handlers,
> or as DHTML documents.
> Search handlers can be either static or dynamic. Static handlers
> are loaded only when they are selected by the user. Dynamic handlers
> are loaded by the Shell at startup and are not terminated until the
> Shell exits. Handlers implemented as shortcut menu handlers can be
> either static or dynamic. Handlers implemented as DHTML documents must
> be static.
> Search handlers appear on the Find submenu of the Start menu and
> the Find submenu of the Windows Explorer Tools menu. Search handlers
> appear only on the Search submenu of the Start menu. To make a custom
> search pane available through the Windows Explorer menu bar, you must
> implement it as a band object. It is then listed on the Explorer Bar
> submenu of the Windows Explorer View menu.
>
> Registering Search Handlers
> Search handlers are registered under the file class's
>
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Curr entVersion\Explorer\FindEx
tensions
> subkey. From this point, the registration procedure depends on whether
> the handler is to be static or dynamic. For a general discussion of how
> to register Shell extension handlers, see Creating Shell Extension
> Handlers.
>
> Registering a Static Search Handler
> Static search handlers are loaded only when they are launched by the
> user. This approach works best for DLLs that are small and can be
> loaded quickly. If you are using DHTML to implement your handler, it
> must be static. To register a static extension handler, create a subkey
> named for the handler under the Static subkey of the FindExtensions
> subkey. The name is not used by the system, but it must not be
> identical to other search handler names under the FindExtensions
> subkey.
>
> Shortcut menu-based search handlers
> If your handler is implemented as a shortcut menu handler, set the
> default value of the handler's name subkey to the object's CLSID GUID.
> Under the handler's name subkey, create a subkey named 0 (zero) and set
> its default value to the string that will be displayed in the Search or
> Find submenu. You can enable keyboard shortcuts in the usual way, by
> preceding the shortcut character with an ampersand (&). You can have an
> optional small icon displayed to the right of the menu text by creating
> a DefaultIcon subkey under the 0 subkey. Set its default value to a
> string containing the path of the file containing the icon, followed by
> a comma, followed by the icon's zero-based index.
>
> The following example registers the MySearchEngine search handler. The
> menu text is "My Search Engine", with M specified as the shortcut key.
> The icon is in C:\MyDir\MySearch.dll, with an index of 2.
>
> HKEY_LOCAL_MACHINE
> Software
> Microsoft
> Windows
> CurrentVersion
> Explorer
> FindExtensions
> Static
> MySearchEngine={MySearchEngine CLSID GUID}
> 0=&My Search Engine
> DefaultIcon=c:\MyDir\MySearch.dll,2
>
> DHTML-based search handlers
> With Windows 2000, you can also implement a search handler as a DHTML
> document. Its name is listed in the Search submenu of the Start menu.
> When the user selects it, it launches Windows Explorer with the
> Explorer bar opened to the search document. You can also specify a
> DHTML document to be displayed to the right of the Explorer bar. There
> is no way to launch a third party handler from the default Search pane.
> Search engines can be launched directly from Windows Explorer, but only
> if they are implemented as as band objects.
>
> To register a DHTML-based search handler, set the handler's name subkey
> to the string form of CLSID_ShellSearchExt (currently
> {169A0691-8DF9-11d1-A1C4-00C04FD75D13}) and create the following
> subkeys:
>
> 1.. Create a 0 (zero) subkey under the name subkey and set its
> default value to the menu text.
> 2.. To have an icon displayed next to the menu text, create a
> DefaultIcon subkey under 0 and set its default value to the icon's path
> and index.
> 3.. Create a SearchGUID subkey under 0. Assign a GUID to the DHTML
> document and set the default value of SearchGUID to its string form.
> This GUID does not need to be registered under HKEY_CLASSES_ROOT\CLSID.
> 4.. Create a Url subkey under SearchGUID. Set its default value to
> the path of the HTM document that will appear in the Explorer bar.
> 5.. Create a UrlNavNew subkey under SearchGUID. Set its default value
> to the path of the HTML document that will appear to the right of the
> Explorer bar.
> The following example registers the MySearchEngine search handler
> implemented as a DHTML document. The menu text is "My Search Engine",
> with M specified as the shortcut key. The icon is in
> C:\MyDir\MySearch.dll, with an index of 2. The Explorer bar's DHTML
> document is C:\MyDir\MySearch.htm, and the document that will be
> displayed to the right of the Explorer bar is
> C:\MyDir\MySearchPage.htm.
>
> HKEY_LOCAL_MACHINE
> Software
> Microsoft
> Windows
> CurrentVersion
> Explorer
> FindExtensions
> Static
> MySearchEngine={169A0691-8DF9-11d1-A1C4-00C04FD75D13}
> 0=&My Search Engine
> DefaultIcon=c:\MyDir\MySearch.dll,2
> SearchGUID={My Search GUID}
> Url=C:\MyDir\MySearch.htm
> UrlNavNew=\MyDir\MySearchPage.htm
>
> Registering a Dynamic Search Handler
> If your handler is implemented as a shortcut menu handler, you can also
> register it as a dynamic handler. In that case, it will be loaded with
> the Shell and will terminate only when the Shell exits. Dynamic search
> handlers respond much more quickly than static handlers when they are
> launched by the user. This approach works best if your handler's DLL
> might take a long time to load, or if it is likely to be called
> frequently.
>
> Dynamic search handlers are registered under the
>
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Curr entVersion\Explorer\FindEx
tensions
> subkey. Create a subkey of FindExtensions named for the handler, and
> set its default value to the handler's CLSID GUID. Menu icons are not
> supported for dynamic search handlers. The following example registers
> MySearchEngine as a dynamic search handler.
>
> HKEY_LOCAL_MACHINE
> Software
> Microsoft
> Windows
> CurrentVersion
> Explorer
> FindExtensions
> MySearchEngine={MySearchEngine CLSID GUID}
> 0=&My Search Engine
>
> Unlike static search handlers, you do not specify the menu text in the
> registry. When the handler is loaded, the Shell will call the handler's
> IContextMenu::QueryContextMenu method to add items to the Find or
> Search submenu.
>
> Implementing Search Handlers
> Search handlers can be implemented as shortcut menu handlers for all
> versions of Windows. For Windows 2000, they can also be implemented as
> DHTML documents.
>
> For a general discussion of how to implement shortcut menu handlers,
> see Creating Shortcut Menu Handlers. Search handlers differ from
> standard shortcut menu handlers in only a few ways.
>
> For static menu handlers, the Find or Search submenu is created from
> the information in the registry. There is no need to have the handler
> add a menu item, as a normal shortcut menu handler would. The Shell
> manages static menu handlers in the following way:
>
> a.. When the user launches the handler's menu item, the Shell loads
> the handler's DLL and calls IContextMenu::InvokeCommand to notify the
> handler to launch the search engine. The IShellExtInit::Initialize and
> IContextMenu::QueryContextMenu methods are not called.
> b.. When IContextMenu::InvokeCommand is called, the lpVerb member of
> the CMINVOKECOMMANDINFO structure that is passed in identifies the
> command. The low-order word of lpVerb is set to the numerical
> equivalent of the command's subkey name. Since this subkey is normally
> named 0, lpVerb is usually set to zero. The handler should then launch
> the search engine.
> Dynamic search handlers are implemented in much the same way as normal
> shortcut menu handlers. The primary exception is that when
> IShellExtInit::Initialize is called, the pidlFolder and lpdobj
> arguments are set to NULL.
>
> DHTML-based search handlers are implemented as a normal DHTML document.
> They can include any HTML, DHTML, or scripting technology that is
> supported by Microsoft® Internet Explorer.
>
>
> --
> ----------------------------------------------------------
> http://www.g2mil.com/Dec2003.htm
> "Kelly" > wrote in message
> ...
>> Start here: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\
>> CurrentVersion\Explorer\FindExtensions\Static\Shel lSearch
>>
>> --
>> Happy Holidays,
>> Kelly
>>
>> MS-MVP Win98/XP
>> [AE-Windows® XP]
>>
>> Troubleshooting Windows XP
>> http://www.kellys-korner-xp.com
>>
>> Repair/Customize Quick Launch, Taskbar and Notification Area
>> http://www.kellys-korner-xp.com/taskbarplus!.htm
>>
>> Registry Edits, Tips and Tricks for XP
>> http://www.kellys-korner-xp.com/xp_tweaks.htm
>>
>>
>> "rtdos" > wrote in message
>> news:IOxBb.496074$Fm2.478314@attbi_s04...
>>> I'd like to add a link to a search engine (such as Google or Yahoo)
>>> to the
>>> search folder on my classic start menu, but can't find a reference
>> anywhere.
>>>
>>> Where should I look ?
>>>
>>>
>>> --
>>> * REPLY REQUESTED WHEN CONVENIENT *
>>>
>>> Woodzy
>>> (netscape community webring)
>>> http://l.webring.com/hub?ring=netscape
David Candy
January 8th 04, 08:00 PM
I'm a New South Welshman (or welshperson). I do not drink bundy, xxxx, =
or anything else from our enemies. Nor do I lick cane toads.
--=20
----------------------------------------------------------
http://www.g2mil.com/Dec2003.htm
"john" > wrote in message =
...
> Sure you're finished, David? Been on the Bundy again! :-)
>=20
> --
> John
>=20
> > Creating Search Handlers
> > The Shell supports several search utilities that allow users to =
locate
> > namespace objects such as files or printers. You can create a custom
> > search engine and make it available to users by implementing and
> > registering a search handler.
> >
> > The general procedures for implementing and registering a Shell
> > extension handler are discussed in Creating Shell Extension =
Handlers.
> > This document focuses on those aspects of implementation that are
> > specific to search handlers.
> >
> > a.. How Search Handlers Work
> > b.. Registering Search Handlers
> > c.. Implementing Search Handlers
> > How Search Handlers Work
> > Users have two ways to select a search engine. The first way is from
> > the Start menu. With systems earlier than Microsoft=AE Windows=AE =
2000,
> > selecting the Find command on the Start menu displays a submenu of =
the
> > available search engines. With Windows 2000 and later, the Start =
menu's
> > Find command is renamed Search. The following illustration shows the
> > Search button on a Microsoft=AE Windows=AE XP system.
> >
> >
> > Users can also launch a search from Windows Explorer. On systems
> > earlier than Windows 2000, they click the Find command on the Tools
> > menu to display essentially the same menu as the one associated with
> > the Start menu. However, Windows Explorer for Windows 2000 and later
> > handles search engines in a very different way. Instead of handling
> > search engines as a submenu of the Tools menu, there is now a Search
> > button on the toolbar. Clicking this button opens the Explorer bar's
> > Search pane. The following illustration shows the search pane.
> >
> >
> > There are a number of differences in how Windows 2000 and later =
systems
> > manage search handlers. These differences affect both implementation
> > and registration.
> >
> > Pre-Windows 2000 Windows 2000 and later
> > Search handlers are implemented as a type of shortcut menu
> > handler. Search handlers can be implemented as shortcut menu =
handlers,
> > or as DHTML documents.
> > Search handlers can be either static or dynamic. Static =
handlers
> > are loaded only when they are selected by the user. Dynamic handlers
> > are loaded by the Shell at startup and are not terminated until the
> > Shell exits. Handlers implemented as shortcut menu handlers can be
> > either static or dynamic. Handlers implemented as DHTML documents =
must
> > be static.
> > Search handlers appear on the Find submenu of the Start menu =
and
> > the Find submenu of the Windows Explorer Tools menu. Search handlers
> > appear only on the Search submenu of the Start menu. To make a =
custom
> > search pane available through the Windows Explorer menu bar, you =
must
> > implement it as a band object. It is then listed on the Explorer Bar
> > submenu of the Windows Explorer View menu.
> >
> > Registering Search Handlers
> > Search handlers are registered under the file class's
> >
> =
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Curr entVersion\Explorer\Fin=
dEx
> tensions
> > subkey. From this point, the registration procedure depends on =
whether
> > the handler is to be static or dynamic. For a general discussion of =
how
> > to register Shell extension handlers, see Creating Shell Extension
> > Handlers.
> >
> > Registering a Static Search Handler
> > Static search handlers are loaded only when they are launched by the
> > user. This approach works best for DLLs that are small and can be
> > loaded quickly. If you are using DHTML to implement your handler, it
> > must be static. To register a static extension handler, create a =
subkey
> > named for the handler under the Static subkey of the FindExtensions
> > subkey. The name is not used by the system, but it must not be
> > identical to other search handler names under the FindExtensions
> > subkey.
> >
> > Shortcut menu-based search handlers
> > If your handler is implemented as a shortcut menu handler, set the
> > default value of the handler's name subkey to the object's CLSID =
GUID.
> > Under the handler's name subkey, create a subkey named 0 (zero) and =
set
> > its default value to the string that will be displayed in the Search =
or
> > Find submenu. You can enable keyboard shortcuts in the usual way, by
> > preceding the shortcut character with an ampersand (&). You can have =
an
> > optional small icon displayed to the right of the menu text by =
creating
> > a DefaultIcon subkey under the 0 subkey. Set its default value to a
> > string containing the path of the file containing the icon, followed =
by
> > a comma, followed by the icon's zero-based index.
> >
> > The following example registers the MySearchEngine search handler. =
The
> > menu text is "My Search Engine", with M specified as the shortcut =
key.
> > The icon is in C:\MyDir\MySearch.dll, with an index of 2.
> >
> > HKEY_LOCAL_MACHINE
> > Software
> > Microsoft
> > Windows
> > CurrentVersion
> > Explorer
> > FindExtensions
> > Static
> > MySearchEngine=3D{MySearchEngine CLSID GUID}
> > 0=3D&My Search Engine
> > DefaultIcon=3Dc:\MyDir\MySearch.dll,2
> >
> > DHTML-based search handlers
> > With Windows 2000, you can also implement a search handler as a =
DHTML
> > document. Its name is listed in the Search submenu of the Start =
menu.
> > When the user selects it, it launches Windows Explorer with the
> > Explorer bar opened to the search document. You can also specify a
> > DHTML document to be displayed to the right of the Explorer bar. =
There
> > is no way to launch a third party handler from the default Search =
pane.
> > Search engines can be launched directly from Windows Explorer, but =
only
> > if they are implemented as as band objects.
> >
> > To register a DHTML-based search handler, set the handler's name =
subkey
> > to the string form of CLSID_ShellSearchExt (currently
> > {169A0691-8DF9-11d1-A1C4-00C04FD75D13}) and create the following
> > subkeys:
> >
> > 1.. Create a 0 (zero) subkey under the name subkey and set its
> > default value to the menu text.
> > 2.. To have an icon displayed next to the menu text, create a
> > DefaultIcon subkey under 0 and set its default value to the icon's =
path
> > and index.
> > 3.. Create a SearchGUID subkey under 0. Assign a GUID to the DHTML
> > document and set the default value of SearchGUID to its string form.
> > This GUID does not need to be registered under =
HKEY_CLASSES_ROOT\CLSID.
> > 4.. Create a Url subkey under SearchGUID. Set its default value to
> > the path of the HTM document that will appear in the Explorer bar.
> > 5.. Create a UrlNavNew subkey under SearchGUID. Set its default =
value
> > to the path of the HTML document that will appear to the right of =
the
> > Explorer bar.
> > The following example registers the MySearchEngine search handler
> > implemented as a DHTML document. The menu text is "My Search =
Engine",
> > with M specified as the shortcut key. The icon is in
> > C:\MyDir\MySearch.dll, with an index of 2. The Explorer bar's DHTML
> > document is C:\MyDir\MySearch.htm, and the document that will be
> > displayed to the right of the Explorer bar is
> > C:\MyDir\MySearchPage.htm.
> >
> > HKEY_LOCAL_MACHINE
> > Software
> > Microsoft
> > Windows
> > CurrentVersion
> > Explorer
> > FindExtensions
> > Static
> > =
MySearchEngine=3D{169A0691-8DF9-11d1-A1C4-00C04FD75D13}
> > 0=3D&My Search Engine
> > DefaultIcon=3Dc:\MyDir\MySearch.dll,2
> > SearchGUID=3D{My Search GUID}
> > Url=3DC:\MyDir\MySearch.htm
> > UrlNavNew=3D\MyDir\MySearchPage.htm
> >
> > Registering a Dynamic Search Handler
> > If your handler is implemented as a shortcut menu handler, you can =
also
> > register it as a dynamic handler. In that case, it will be loaded =
with
> > the Shell and will terminate only when the Shell exits. Dynamic =
search
> > handlers respond much more quickly than static handlers when they =
are
> > launched by the user. This approach works best if your handler's DLL
> > might take a long time to load, or if it is likely to be called
> > frequently.
> >
> > Dynamic search handlers are registered under the
> >
> =
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Curr entVersion\Explorer\Fin=
dEx
> tensions
> > subkey. Create a subkey of FindExtensions named for the handler, and
> > set its default value to the handler's CLSID GUID. Menu icons are =
not
> > supported for dynamic search handlers. The following example =
registers
> > MySearchEngine as a dynamic search handler.
> >
> > HKEY_LOCAL_MACHINE
> > Software
> > Microsoft
> > Windows
> > CurrentVersion
> > Explorer
> > FindExtensions
> > MySearchEngine=3D{MySearchEngine CLSID GUID}
> > 0=3D&My Search Engine
> >
> > Unlike static search handlers, you do not specify the menu text in =
the
> > registry. When the handler is loaded, the Shell will call the =
handler's
> > IContextMenu::QueryContextMenu method to add items to the Find or
> > Search submenu.
> >
> > Implementing Search Handlers
> > Search handlers can be implemented as shortcut menu handlers for all
> > versions of Windows. For Windows 2000, they can also be implemented =
as
> > DHTML documents.
> >
> > For a general discussion of how to implement shortcut menu handlers,
> > see Creating Shortcut Menu Handlers. Search handlers differ from
> > standard shortcut menu handlers in only a few ways.
> >
> > For static menu handlers, the Find or Search submenu is created from
> > the information in the registry. There is no need to have the =
handler
> > add a menu item, as a normal shortcut menu handler would. The Shell
> > manages static menu handlers in the following way:
> >
> > a.. When the user launches the handler's menu item, the Shell =
loads
> > the handler's DLL and calls IContextMenu::InvokeCommand to notify =
the
> > handler to launch the search engine. The IShellExtInit::Initialize =
and
> > IContextMenu::QueryContextMenu methods are not called.
> > b.. When IContextMenu::InvokeCommand is called, the lpVerb member =
of
> > the CMINVOKECOMMANDINFO structure that is passed in identifies the
> > command. The low-order word of lpVerb is set to the numerical
> > equivalent of the command's subkey name. Since this subkey is =
normally
> > named 0, lpVerb is usually set to zero. The handler should then =
launch
> > the search engine.
> > Dynamic search handlers are implemented in much the same way as =
normal
> > shortcut menu handlers. The primary exception is that when
> > IShellExtInit::Initialize is called, the pidlFolder and lpdobj
> > arguments are set to NULL.
> >
> > DHTML-based search handlers are implemented as a normal DHTML =
document.
> > They can include any HTML, DHTML, or scripting technology that is
> > supported by Microsoft=AE Internet Explorer.
> >
> >
> > --
> > ----------------------------------------------------------
> > http://www.g2mil.com/Dec2003.htm
> > "Kelly" > wrote in message
> > ...
> >> Start here: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\
> >> CurrentVersion\Explorer\FindExtensions\Static\Shel lSearch
> >>
> >> --
> >> Happy Holidays,
> >> Kelly
> >>
> >> MS-MVP Win98/XP
> >> [AE-Windows=AE XP]
> >>
> >> Troubleshooting Windows XP
> >> http://www.kellys-korner-xp.com
> >>
> >> Repair/Customize Quick Launch, Taskbar and Notification Area
> >> http://www.kellys-korner-xp.com/taskbarplus!.htm
> >>
> >> Registry Edits, Tips and Tricks for XP
> >> http://www.kellys-korner-xp.com/xp_tweaks.htm
> >>
> >>
> >> "rtdos" > wrote in message
> >> news:IOxBb.496074$Fm2.478314@attbi_s04...
> >>> I'd like to add a link to a search engine (such as Google or =
Yahoo)
> >>> to the
> >>> search folder on my classic start menu, but can't find a reference
> >> anywhere.
> >>>
> >>> Where should I look ?
> >>>
> >>>
> >>> --
> >>> * REPLY REQUESTED WHEN CONVENIENT *
> >>>
> >>> Woodzy
> >>> (netscape community webring)
> >>> http://l.webring.com/hub?ring=3Dnetscape
>=20
>=20
john
January 8th 04, 08:00 PM
Very wise too - ok, Hahns then.
Born, bred & married in Sydney, but now residing in Melb. - gawd I miss the
northern beaches & the harbour, even after 30 years. My last address was The
Esplanade, Balmoral Beach, but no way could I afford that now. Unfortunately
I left that address a couple of years B4 it went topless.
(Wot, you don't even like pumpkin scones?)
--
John
> I'm a New South Welshman (or welshperson). I do not drink bundy, xxxx,
> or anything else from our enemies. Nor do I lick cane toads.
>
> --
> ----------------------------------------------------------
> http://www.g2mil.com/Dec2003.htm
> "john" > wrote in message
> ...
>> Sure you're finished, David? Been on the Bundy again! :-)
>>
>> --
>> John
>>
>>> Creating Search Handlers
>>> The Shell supports several search utilities that allow users to locate
>>> namespace objects such as files or printers. You can create a custom
>>> search engine and make it available to users by implementing and
>>> registering a search handler.
>>>
>>> The general procedures for implementing and registering a Shell
>>> extension handler are discussed in Creating Shell Extension Handlers.
>>> This document focuses on those aspects of implementation that are
>>> specific to search handlers.
>>>
>>> a.. How Search Handlers Work
>>> b.. Registering Search Handlers
>>> c.. Implementing Search Handlers
>>> How Search Handlers Work
>>> Users have two ways to select a search engine. The first way is from
>>> the Start menu. With systems earlier than Microsoft® Windows® 2000,
>>> selecting the Find command on the Start menu displays a submenu of the
>>> available search engines. With Windows 2000 and later, the Start
>>> menu's
>>> Find command is renamed Search. The following illustration shows the
>>> Search button on a Microsoft® Windows® XP system.
>>>
>>>
>>> Users can also launch a search from Windows Explorer. On systems
>>> earlier than Windows 2000, they click the Find command on the Tools
>>> menu to display essentially the same menu as the one associated with
>>> the Start menu. However, Windows Explorer for Windows 2000 and later
>>> handles search engines in a very different way. Instead of handling
>>> search engines as a submenu of the Tools menu, there is now a Search
>>> button on the toolbar. Clicking this button opens the Explorer bar's
>>> Search pane. The following illustration shows the search pane.
>>>
>>>
>>> There are a number of differences in how Windows 2000 and later
>>> systems
>>> manage search handlers. These differences affect both implementation
>>> and registration.
>>>
>>> Pre-Windows 2000 Windows 2000 and later
>>> Search handlers are implemented as a type of shortcut menu
>>> handler. Search handlers can be implemented as shortcut menu handlers,
>>> or as DHTML documents.
>>> Search handlers can be either static or dynamic. Static handlers
>>> are loaded only when they are selected by the user. Dynamic handlers
>>> are loaded by the Shell at startup and are not terminated until the
>>> Shell exits. Handlers implemented as shortcut menu handlers can be
>>> either static or dynamic. Handlers implemented as DHTML documents must
>>> be static.
>>> Search handlers appear on the Find submenu of the Start menu and
>>> the Find submenu of the Windows Explorer Tools menu. Search handlers
>>> appear only on the Search submenu of the Start menu. To make a custom
>>> search pane available through the Windows Explorer menu bar, you must
>>> implement it as a band object. It is then listed on the Explorer Bar
>>> submenu of the Windows Explorer View menu.
>>>
>>> Registering Search Handlers
>>> Search handlers are registered under the file class's
>>>
>>
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Curr entVersion\Explorer\FindEx
>> tensions
>>> subkey. From this point, the registration procedure depends on whether
>>> the handler is to be static or dynamic. For a general discussion of
>>> how
>>> to register Shell extension handlers, see Creating Shell Extension
>>> Handlers.
>>>
>>> Registering a Static Search Handler
>>> Static search handlers are loaded only when they are launched by the
>>> user. This approach works best for DLLs that are small and can be
>>> loaded quickly. If you are using DHTML to implement your handler, it
>>> must be static. To register a static extension handler, create a
>>> subkey
>>> named for the handler under the Static subkey of the FindExtensions
>>> subkey. The name is not used by the system, but it must not be
>>> identical to other search handler names under the FindExtensions
>>> subkey.
>>>
>>> Shortcut menu-based search handlers
>>> If your handler is implemented as a shortcut menu handler, set the
>>> default value of the handler's name subkey to the object's CLSID GUID.
>>> Under the handler's name subkey, create a subkey named 0 (zero) and
>>> set
>>> its default value to the string that will be displayed in the Search
>>> or
>>> Find submenu. You can enable keyboard shortcuts in the usual way, by
>>> preceding the shortcut character with an ampersand (&). You can have
>>> an
>>> optional small icon displayed to the right of the menu text by
>>> creating
>>> a DefaultIcon subkey under the 0 subkey. Set its default value to a
>>> string containing the path of the file containing the icon, followed
>>> by
>>> a comma, followed by the icon's zero-based index.
>>>
>>> The following example registers the MySearchEngine search handler. The
>>> menu text is "My Search Engine", with M specified as the shortcut key.
>>> The icon is in C:\MyDir\MySearch.dll, with an index of 2.
>>>
>>> HKEY_LOCAL_MACHINE
>>> Software
>>> Microsoft
>>> Windows
>>> CurrentVersion
>>> Explorer
>>> FindExtensions
>>> Static
>>> MySearchEngine={MySearchEngine CLSID GUID}
>>> 0=&My Search Engine
>>> DefaultIcon=c:\MyDir\MySearch.dll,2
>>>
>>> DHTML-based search handlers
>>> With Windows 2000, you can also implement a search handler as a DHTML
>>> document. Its name is listed in the Search submenu of the Start menu.
>>> When the user selects it, it launches Windows Explorer with the
>>> Explorer bar opened to the search document. You can also specify a
>>> DHTML document to be displayed to the right of the Explorer bar. There
>>> is no way to launch a third party handler from the default Search
>>> pane.
>>> Search engines can be launched directly from Windows Explorer, but
>>> only
>>> if they are implemented as as band objects.
>>>
>>> To register a DHTML-based search handler, set the handler's name
>>> subkey
>>> to the string form of CLSID_ShellSearchExt (currently
>>> {169A0691-8DF9-11d1-A1C4-00C04FD75D13}) and create the following
>>> subkeys:
>>>
>>> 1.. Create a 0 (zero) subkey under the name subkey and set its
>>> default value to the menu text.
>>> 2.. To have an icon displayed next to the menu text, create a
>>> DefaultIcon subkey under 0 and set its default value to the icon's
>>> path
>>> and index.
>>> 3.. Create a SearchGUID subkey under 0. Assign a GUID to the DHTML
>>> document and set the default value of SearchGUID to its string form.
>>> This GUID does not need to be registered under
>>> HKEY_CLASSES_ROOT\CLSID.
>>> 4.. Create a Url subkey under SearchGUID. Set its default value to
>>> the path of the HTM document that will appear in the Explorer bar.
>>> 5.. Create a UrlNavNew subkey under SearchGUID. Set its default
>>> value
>>> to the path of the HTML document that will appear to the right of the
>>> Explorer bar.
>>> The following example registers the MySearchEngine search handler
>>> implemented as a DHTML document. The menu text is "My Search Engine",
>>> with M specified as the shortcut key. The icon is in
>>> C:\MyDir\MySearch.dll, with an index of 2. The Explorer bar's DHTML
>>> document is C:\MyDir\MySearch.htm, and the document that will be
>>> displayed to the right of the Explorer bar is
>>> C:\MyDir\MySearchPage.htm.
>>>
>>> HKEY_LOCAL_MACHINE
>>> Software
>>> Microsoft
>>> Windows
>>> CurrentVersion
>>> Explorer
>>> FindExtensions
>>> Static
>>> MySearchEngine={169A0691-8DF9-11d1-A1C4-00C04FD75D13}
>>> 0=&My Search Engine
>>> DefaultIcon=c:\MyDir\MySearch.dll,2
>>> SearchGUID={My Search GUID}
>>> Url=C:\MyDir\MySearch.htm
>>> UrlNavNew=\MyDir\MySearchPage.htm
>>>
>>> Registering a Dynamic Search Handler
>>> If your handler is implemented as a shortcut menu handler, you can
>>> also
>>> register it as a dynamic handler. In that case, it will be loaded with
>>> the Shell and will terminate only when the Shell exits. Dynamic search
>>> handlers respond much more quickly than static handlers when they are
>>> launched by the user. This approach works best if your handler's DLL
>>> might take a long time to load, or if it is likely to be called
>>> frequently.
>>>
>>> Dynamic search handlers are registered under the
>>>
>>
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Curr entVersion\Explorer\FindEx
>> tensions
>>> subkey. Create a subkey of FindExtensions named for the handler, and
>>> set its default value to the handler's CLSID GUID. Menu icons are not
>>> supported for dynamic search handlers. The following example registers
>>> MySearchEngine as a dynamic search handler.
>>>
>>> HKEY_LOCAL_MACHINE
>>> Software
>>> Microsoft
>>> Windows
>>> CurrentVersion
>>> Explorer
>>> FindExtensions
>>> MySearchEngine={MySearchEngine CLSID GUID}
>>> 0=&My Search Engine
>>>
>>> Unlike static search handlers, you do not specify the menu text in the
>>> registry. When the handler is loaded, the Shell will call the
>>> handler's
>>> IContextMenu::QueryContextMenu method to add items to the Find or
>>> Search submenu.
>>>
>>> Implementing Search Handlers
>>> Search handlers can be implemented as shortcut menu handlers for all
>>> versions of Windows. For Windows 2000, they can also be implemented as
>>> DHTML documents.
>>>
>>> For a general discussion of how to implement shortcut menu handlers,
>>> see Creating Shortcut Menu Handlers. Search handlers differ from
>>> standard shortcut menu handlers in only a few ways.
>>>
>>> For static menu handlers, the Find or Search submenu is created from
>>> the information in the registry. There is no need to have the handler
>>> add a menu item, as a normal shortcut menu handler would. The Shell
>>> manages static menu handlers in the following way:
>>>
>>> a.. When the user launches the handler's menu item, the Shell loads
>>> the handler's DLL and calls IContextMenu::InvokeCommand to notify the
>>> handler to launch the search engine. The IShellExtInit::Initialize and
>>> IContextMenu::QueryContextMenu methods are not called.
>>> b.. When IContextMenu::InvokeCommand is called, the lpVerb member of
>>> the CMINVOKECOMMANDINFO structure that is passed in identifies the
>>> command. The low-order word of lpVerb is set to the numerical
>>> equivalent of the command's subkey name. Since this subkey is normally
>>> named 0, lpVerb is usually set to zero. The handler should then launch
>>> the search engine.
>>> Dynamic search handlers are implemented in much the same way as normal
>>> shortcut menu handlers. The primary exception is that when
>>> IShellExtInit::Initialize is called, the pidlFolder and lpdobj
>>> arguments are set to NULL.
>>>
>>> DHTML-based search handlers are implemented as a normal DHTML
>>> document.
>>> They can include any HTML, DHTML, or scripting technology that is
>>> supported by Microsoft® Internet Explorer.
>>>
>>>
>>> --
>>> ----------------------------------------------------------
>>> http://www.g2mil.com/Dec2003.htm
>>> "Kelly" > wrote in message
>>> ...
>>>> Start here: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\
>>>> CurrentVersion\Explorer\FindExtensions\Static\Shel lSearch
>>>>
>>>> --
>>>> Happy Holidays,
>>>> Kelly
>>>>
>>>> MS-MVP Win98/XP
>>>> [AE-Windows® XP]
>>>>
>>>> Troubleshooting Windows XP
>>>> http://www.kellys-korner-xp.com
>>>>
>>>> Repair/Customize Quick Launch, Taskbar and Notification Area
>>>> http://www.kellys-korner-xp.com/taskbarplus!.htm
>>>>
>>>> Registry Edits, Tips and Tricks for XP
>>>> http://www.kellys-korner-xp.com/xp_tweaks.htm
>>>>
>>>>
>>>> "rtdos" > wrote in message
>>>> news:IOxBb.496074$Fm2.478314@attbi_s04...
>>>>> I'd like to add a link to a search engine (such as Google or Yahoo)
>>>>> to the
>>>>> search folder on my classic start menu, but can't find a reference
>>>> anywhere.
>>>>>
>>>>> Where should I look ?
>>>>>
>>>>>
>>>>> --
>>>>> * REPLY REQUESTED WHEN CONVENIENT *
>>>>>
>>>>> Woodzy
>>>>> (netscape community webring)
>>>>> http://l.webring.com/hub?ring=netscape
status@rtdos.info
January 8th 04, 08:00 PM
thanks David & Kelly I'll give it a shot (but be ready for more
questions as i've always got 'em :o) )
Joseph
January 8th 04, 08:12 PM
Thank you.
This explains a lot about dynamic menus that was previously unclear.
However I do not approve of (applications) tinkering with the registry
dynamically. There is already way too much stuff there that can too
easily disrupt the smooth function of the system. All applications
should store as much settings as possible in their own directories, and
all user specific settings should be stored in the user's directory
tree, (it may not be visible to the user, and each application should
store it's settings separately).
JosephKK
David Candy wrote:
> Creating Search Handlers
> The Shell supports several search utilities that allow users to locate namespace objects such as files or printers. You can create a custom search engine and make it available to users by implementing and registering a search handler.
>
> The general procedures for implementing and registering a Shell extension handler are discussed in Creating Shell Extension Handlers. This document focuses on those aspects of implementation that are specific to search handlers.
>
> a.. How Search Handlers Work
> b.. Registering Search Handlers
> c.. Implementing Search Handlers
> How Search Handlers Work
> Users have two ways to select a search engine. The first way is from the Start menu. With systems earlier than Microsoft® Windows® 2000, selecting the Find command on the Start menu displays a submenu of the available search engines. With Windows 2000 an
d later, the Start menu's Find command is renamed Search. The following illustration shows the Search button on a Microsoft® Windows® XP system.
>
>
> Users can also launch a search from Windows Explorer. On systems earlier than Windows 2000, they click the Find command on the Tools menu to display essentially the same menu as the one associated with the Start menu. However, Windows Explorer for Window
s 2000 and later handles search engines in a very different way. Instead of handling search engines as a submenu of the Tools menu, there is now a Search button on the toolbar. Clicking this button opens the Explorer bar's Search pane. The following illust
ration shows the search pane.
>
>
> There are a number of differences in how Windows 2000 and later systems manage search handlers. These differences affect both implementation and registration.
>
> Pre-Windows 2000 Windows 2000 and later
> Search handlers are implemented as a type of shortcut menu handler. Search handlers can be implemented as shortcut menu handlers, or as DHTML documents.
> Search handlers can be either static or dynamic. Static handlers are loaded only when they are selected by the user. Dynamic handlers are loaded by the Shell at startup and are not terminated until the Shell exits. Handlers implemented as shortcut
menu handlers can be either static or dynamic. Handlers implemented as DHTML documents must be static.
> Search handlers appear on the Find submenu of the Start menu and the Find submenu of the Windows Explorer Tools menu. Search handlers appear only on the Search submenu of the Start menu. To make a custom search pane available through the Windows Ex
plorer menu bar, you must implement it as a band object.. It is then listed on the Explorer Bar submenu of the Windows Explorer View menu.
>
> Registering Search Handlers
> Search handlers are registered under the file class's HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Curr entVersion\Explorer\FindExtensions subkey. From this point, the registration procedure depends on whether the handler is to be static or dynamic. For
a general discussion of how to register Shell extension handlers, see Creating Shell Extension Handlers.
>
> Registering a Static Search Handler
> Static search handlers are loaded only when they are launched by the user. This approach works best for DLLs that are small and can be loaded quickly. If you are using DHTML to implement your handler, it must be static. To register a static extension han
dler, create a subkey named for the handler under the Static subkey of the FindExtensions subkey. The name is not used by the system, but it must not be identical to other search handler names under the FindExtensions subkey.
>
> Shortcut menu-based search handlers
> If your handler is implemented as a shortcut menu handler, set the default value of the handler's name subkey to the object's CLSID GUID. Under the handler's name subkey, create a subkey named 0 (zero) and set its default value to the string that will be
displayed in the Search or Find submenu. You can enable keyboard shortcuts in the usual way, by preceding the shortcut character with an ampersand (&). You can have an optional small icon displayed to the right of the menu text by creating a DefaultIcon s
ubkey under the 0 subkey. Set its default value to a string containing the path of the file containing the icon, followed by a comma, followed by the icon's zero-based index.
>
> The following example registers the MySearchEngine search handler. The menu text is "My Search Engine", with M specified as the shortcut key. The icon is in C:\MyDir\MySearch.dll, with an index of 2.
>
> HKEY_LOCAL_MACHINE
> Software
> Microsoft
> Windows
> CurrentVersion
> Explorer
> FindExtensions
> Static
> MySearchEngine={MySearchEngine CLSID GUID}
> 0=&My Search Engine
> DefaultIcon=c:\MyDir\MySearch.dll,2
>
> DHTML-based search handlers
> With Windows 2000, you can also implement a search handler as a DHTML document. Its name is listed in the Search submenu of the Start menu. When the user selects it, it launches Windows Explorer with the Explorer bar opened to the search document. You ca
n also specify a DHTML document to be displayed to the right of the Explorer bar. There is no way to launch a third party handler from the default Search pane. Search engines can be launched directly from Windows Explorer, but only if they are implemented
as as band objects.
>
> To register a DHTML-based search handler, set the handler's name subkey to the string form of CLSID_ShellSearchExt (currently {169A0691-8DF9-11d1-A1C4-00C04FD75D13}) and create the following subkeys:
>
> 1.. Create a 0 (zero) subkey under the name subkey and set its default value to the menu text.
> 2.. To have an icon displayed next to the menu text, create a DefaultIcon subkey under 0 and set its default value to the icon's path and index.
> 3.. Create a SearchGUID subkey under 0. Assign a GUID to the DHTML document and set the default value of SearchGUID to its string form. This GUID does not need to be registered under HKEY_CLASSES_ROOT\CLSID.
> 4.. Create a Url subkey under SearchGUID. Set its default value to the path of the HTM document that will appear in the Explorer bar.
> 5.. Create a UrlNavNew subkey under SearchGUID. Set its default value to the path of the HTML document that will appear to the right of the Explorer bar.
> The following example registers the MySearchEngine search handler implemented as a DHTML document. The menu text is "My Search Engine", with M specified as the shortcut key. The icon is in C:\MyDir\MySearch.dll, with an index of 2. The Explorer bar's DHT
ML document is C:\MyDir\MySearch.htm, and the document that will be displayed to the right of the Explorer bar is C:\MyDir\MySearchPage.htm.
>
> HKEY_LOCAL_MACHINE
> Software
> Microsoft
> Windows
> CurrentVersion
> Explorer
> FindExtensions
> Static
> MySearchEngine={169A0691-8DF9-11d1-A1C4-00C04FD75D13}
> 0=&My Search Engine
> DefaultIcon=c:\MyDir\MySearch.dll,2
> SearchGUID={My Search GUID}
> Url=C:\MyDir\MySearch.htm
> UrlNavNew=\MyDir\MySearchPage.htm
>
> Registering a Dynamic Search Handler
> If your handler is implemented as a shortcut menu handler, you can also register it as a dynamic handler. In that case, it will be loaded with the Shell and will terminate only when the Shell exits. Dynamic search handlers respond much more quickly than
static handlers when they are launched by the user. This approach works best if your handler's DLL might take a long time to load, or if it is likely to be called frequently.
>
> Dynamic search handlers are registered under the HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Curr entVersion\Explorer\FindExtensions subkey. Create a subkey of FindExtensions named for the handler, and set its default value to the handler's CLSID GUID.
Menu icons are not supported for dynamic search handlers. The following example registers MySearchEngine as a dynamic search handler.
>
> HKEY_LOCAL_MACHINE
> Software
> Microsoft
> Windows
> CurrentVersion
> Explorer
> FindExtensions
> MySearchEngine={MySearchEngine CLSID GUID}
> 0=&My Search Engine
>
> Unlike static search handlers, you do not specify the menu text in the registry. When the handler is loaded, the Shell will call the handler's IContextMenu::QueryContextMenu method to add items to the Find or Search submenu.
>
> Implementing Search Handlers
> Search handlers can be implemented as shortcut menu handlers for all versions of Windows. For Windows 2000, they can also be implemented as DHTML documents.
>
> For a general discussion of how to implement shortcut menu handlers, see Creating Shortcut Menu Handlers. Search handlers differ from standard shortcut menu handlers in only a few ways.
>
> For static menu handlers, the Find or Search submenu is created from the information in the registry. There is no need to have the handler add a menu item, as a normal shortcut menu handler would. The Shell manages static menu handlers in the following w
ay:
>
> a.. When the user launches the handler's menu item, the Shell loads the handler's DLL and calls IContextMenu::InvokeCommand to notify the handler to launch the search engine. The IShellExtInit::Initialize and IContextMenu::QueryContextMenu methods are
not called.
> b.. When IContextMenu::InvokeCommand is called, the lpVerb member of the CMINVOKECOMMANDINFO structure that is passed in identifies the command. The low-order word of lpVerb is set to the numerical equivalent of the command's subkey name. Since this su
bkey is normally named 0, lpVerb is usually set to zero. The handler should then launch the search engine.
> Dynamic search handlers are implemented in much the same way as normal shortcut menu handlers. The primary exception is that when IShellExtInit::Initialize is called, the pidlFolder and lpdobj arguments are set to NULL.
>
> DHTML-based search handlers are implemented as a normal DHTML document. They can include any HTML, DHTML, or scripting technology that is supported by Microsoft® Internet Explorer.
>
>
vBulletin® v3.6.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.