Hi Alex, > I would like to create a talkbar toolbar to control some > applications from there ... I would like to ask how you > got the main CLSID you are using everywhere ?
Deskbars are actually quite easy to create. The following is copy/pasted out of the "Programming Microsoft Internet Explorer 5" book by Microsoft press. It has a lot more information you should have at your fingerprints for *really* taking advantage of IE Bars and Windows Deskbars. Regards, Shawn K. Hall http://ReliableAnswers.com/ '// ======================================================== "I have made myself what I am." -- Tecumseh '// ======================================================== Creating Explorer Bars Using DHTML and Script Creating Explorer Bars for Internet Explorer 5 is relatively easy, especially if you already know how to create Web pages. You just need to add a few keys and values to the Registry to tell Internet Explorer where to obtain your Web page and how to display it-vertically, as an Explorer band, or horizontally, as a Comm band. To show your Web page as an Explorer Bar in Internet Explorer, perform the following steps: Create a globally unique identifier (GUID) that will be used for your Web page. Use the Guidgen.exe program that is included with Microsoft Visual Studio. >From the Create GUID dialog box, select the Registry Format radio button, as shown in Figure 10-6. Then click the Copy button to copy the new GUID to the clipboard. Figure 10-6. The Create GUID dialog box. Run the Regedit application, and create a new key under HKEY_CLASSES_ ROOT\CLSID. Name it by using the GUID you created in step 1. The new key should look like this: HKEY_CLASSES_ROOT\CLSID\<GUID Created In Step 1> Set the Default value of this key to the name of your Explorer Bar that you want to appear in Internet Explorer's View/Explorer Bar menu. Create a new subkey beneath the key you created in step 3, and name this key Implemented Categories. This key will tell Internet Explorer how to display your Explorer Bar-vertically or horizontally. The new key should look like this: HKEY_CLASSES_ROOT\CLSID\<GUID Created In Step 1>\Implemented Categories Create a subkey beneath the key you created in step 5, and name it by using the category ID (CATID) of the type of Explorer Bar you want to create. The following table shows the CATIDs that you can use to specify an Explorer band or a Comm band. (You can't specify a Desk band by using this technique.) Category ID (CATID) Purpose {00021493-0000-0000-C000-000000000046} Explorer band (vertical) {00021494-0000-0000-C000-000000000046} Comm band (horizontal) At this point, the keys you've created should look similar to those shown in Figure 10-7. Of course, the GUID you created in step 1 will be different. Figure 10-7. New Registry keys after step 6. Create a new key under the key you created for your GUID in step 3, and name it InProcServer32. The new key should look like this: HKEY_CLASSES_ROOT\CLSID\<GUID Created In Step 1> \InProcServer32 The value of the key you created in step 7 will tell Internet Explorer how to start your Explorer Bar. Because you are creating an Explorer Bar to contain a Web page that you've created, set the Default value of the InProcServer32 key to the full path of shdocvw.dll. (The shdocvw.dll file is located in the \Windows\System directory for Microsoft Windows 95 and later versions, and the \WinNT\System32 directory for Microsoft Windows NT systems.) If you were creating an Explorer Bar in C++ and COM, you would set this value to the path of the Explorer Bar's DLL file. (More on this in the next section.) Create a new string value under the InProcServer32 key named ThreadingModel. Set the value of ThreadingModel to Apartment. The Registry keys should look similar to those in Figure 10-8. Figure 10-8. Registry keys after step 9. Create a new key under the GUID key that you created in step 3, and name this key Instance. This key is required for Explorer Bars that display Web pages but is optional for Explorer Bars created by using C++ and COM. The new key should look like this: HKEY_CLASSES_ROOT\CLSID\<GUID Created In Step 1>\Instance Create a new string value named CLSID under the Instance key. Set the value of CLSID as follows: {4D5C8C2A-D075-11d0-B416-00C04FB90376} Create a new key named InitPropertyBag under the Instance key. Again, this key is required only if you are creating an Explorer Bar that displays a Web page. The new key should look like this: HKEY_CLASSES_ROOT\CLSID\<GUID Created In Step 1> \Instance\InitPropertyBag Create a new string value under the InitPropertyBag key that you just created. Name this string URL, and set its value to the location of the Web page that you want displayed in the Explorer Bar. Now the Registry key structure should look similar to Figure 10-9. Figure 10-9. Registry key structure after step 13. If you'd like to specify the default size of your Explorer Bar when it is first displayed, follow these additional steps: Create a new key by using the GUID you created in step 1. This key will be created beneath another branch of the Registry, and it should look like this: HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\Explorer Bars\<GUID Created In Step 1> Create a new binary value named BarSize under the key you created in the previous step. Set the value of BarSize to an 8-byte, binary value in hexadecimal notation that specifies the default size for your Explorer Bar. Internet Explorer interprets the value in pixels. For instance, setting the value to 41 00 00 00 00 00 00 00 is equal to 65 pixels. To determine the hexadecimal value that you should use for BarSize, just convert from decimal to hexadecimal the number of pixels that you want your Explorer Bar to be. Now you have a working Explorer Bar that displays a Web page. Although performing all these steps might be cumbersome if you do it manually, you can easily create an ActiveX control that will do it for you. Then you can put this ActiveX control on a Web page so that your Explorer Bar will be installed when users navigate to your Web site. To test your Explorer Bar, select the View/Explorer Bar menu. The name you provided in step 4 will appear on that menu. Just select it as you would any other Explorer Bar. You can also add a button to Internet Explorer's toolbar, as you'll see later in this chapter. TIP --------------------------------------------- To initiate navigation in the main Internet Explorer window when users click a link on the Web page in your Explorer Bar, set TARGET=_main as follows: <A HREF="http://msdn.microsoft.com/workshop" TARGET=_main> --------------------------------------------- Creating Explorer Bars and Desk Bands Using C++ and COM Creating Explorer Bars and Desk bands by using C++ and COM is a bit more involved than creating them by using DHTML and script, as you might imagine. However, C++ and COM give you a lot more power and flexibility. For example, you might want to know when users are navigating in the main Internet Explorer window. To achieve this, you would have to sink events for the WebBrowser of the main Internet Explorer window, which is possible only when using C++. When you use C++ and COM to create an Explorer band, Comm band, or Desk band, the process is almost the same for each type of band object: you create a DLL that implements a few required interfaces and possibly other optional interfaces. The main difference is the way you register the band object. As in the previous section, when you create keys in the Registry to build Explorer Bars, the value of the CATID that you specify beneath the Implemented Categories key determines the type of band object. NOTE -------------------------------------------- Remember that the term band object encompasses both Explorer Bars and Desk bands. When registering your band object, you can choose from the three CATIDs listed in the following table to specify which type of band object you want to create. The values in the table can be used when registering your band object. (These constants are defined in the Internet Explorer 5 shlguid.h header file, which you can download from the MSDN Online Web Workshop.) CATID Constant Value Description CATID_InfoBand {00021493-0000-0000-C000-000000000046} Explorer band CATID_CommBand {00021494-0000-0000-C000-000000000046} Comm band CATID_DeskBand {00021492-0000-0000-C000-000000000046} Desk band ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ DQSD-Devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dqsd-devel
