천객만래 [千客萬來] (It has an interminable succession of visitors)

'툴바'에 해당되는 글 3건

  1. 2010.09.28 [VC++] Toolbar Button Style Guide
  2. 2010.09.28 [VC++] Adding Toolbar Buttons
  3. 2010.09.28 [VC++] Adding Explorer Bars

Toolbar Button Style Guide

This guide will help you design icons for toolbar buttons that you add to the Windows Internet Explorer user interface.

Sizes

The Internet Explorer toolbar requires two sizes for all toolbar icons: 20x20 pixel and 16x16 pixel. The following table shows the difference between the two icons.

Dimensions (in pixels) Example icon
20x20 20x20 16 color
16x16 16x16 16 color

The 20x20 pixel icon is used with the default Internet Explorer toolbar. The 16x16 pixel icon is used when Internet Explorer is in full-screen mode.

Colors

Internet Explorer uses two states for all toolbar buttons: the active state and the default state.

When the user's mouse is over a toolbar button, it is in the active state. At other times, the toolbar button is in the default state.

In the active state, Internet Explorer uses the appropriate color icon for the toolbar button. In the default state, Internet Explorer uses the appropriate grayscale icon. The following table shows the types of icons used for the different states.

State Example icon
Active 20x20 256 color
Default 20x20 256 shade

In addition to the color differences, Internet Explorer uses two color depths: 256-color/shade icons and 16-color/shade icons. The 256-color/shade icons should be designed using the Windows; halftone palette, while the 16-color/shade icons should use the Windows 16 palette. The following table shows the different color depths used.

Depth Example icon
16-color 20x20 16 color
256-color 20x20 256 color
16-shade 20x20 16 shade
256-shade 20x20 256 shade

Design Tips

There are several things to keep in mind when designing toolbar buttons that are going to be integrated with the Internet Explorer user interface. In general, you will want to:

  • Use the same hues and saturation of colors as in the default toolbar icons to keep a consistent and integrated appearance.
  • Make sure the visual transition between your default and active images is smooth.

For 16-color/shade icons, you will want to:

  • Use the Windows 16-color palette.
  • Add a black border around the icon, except when it affects the readability of the image (like with arrows or "X" icons).
  • Keep a fairly flat appearance (little or no dimensioning or shading).

For 256-color/shade icons, you will want to:

  • Use the Windows halftone palette.
  • Use icon-style borders with gray or color as top and left borders and black as the bottom and right borders.
  • Make them more dimensional, using a light source from the upper-left corner and shading where appropriate.

Placing Icons

Toolbar icons need to be placed in two .ico files. The first .ico file should contain three color icons for your button. They are:

  • 16x16 16-color icon (Required)
  • 20x20 16-color icon (Optional)
  • 20x20 256-color icon (Required)

The second .ico file should contain three grayscale icons. The grayscale icons needed are:

  • 16x16 16-shade (Required)
  • 20x20 16-shade (Optional)
  • 20x20 256-shade (Required)

Currently, the 20x20 16-color/shade icons are not being used, so including them in the .ico files is optional. The 16x16 16-color/shade icons are used in full-screen mode, while the 20x20 256-color/shade icons are used in normal mode.

You can use a drawing or paint program to create the appropriate images for each of the icons. To create the .ico files, you can use a tool like Microsoft Visual Studio.

Related Topics

The following are links to topics related to toolbar buttons.

Overview

Tutorial

출처 : http://msdn.microsoft.com/en-us/library/aa753621(v=VS.85).aspx

Posted by SB패밀리

Adding Toolbar Buttons

This tutorial explains how to add a toolbar button to the Windows Internet Explorer user interface. The toolbar button can either run a Microsoft Win32 application, run a script, or open an Explorer Bar. If you also want to create a menu item for the Win32 application or script, see the Adding Menu Items tutorial.

Requirements and Dependencies

Developers who want to add toolbar buttons to Internet Explorer must be familiar with the registry and globally unique identifiers (GUID).

This feature is only available in Microsoft Internet Explorer 5 and later. Internet Explorer 4.0 allows you to add a custom Explorer Bar, but there is no method for adding a toolbar button to access your Explorer Bar.

Toolbar buttons require two sets of icons: one set with the active (color) icons and one set with the default (grayscale) icons. These icons can be stored in two .ico files or inside a resource (like a .dll or .exe file). Icons and strings stored inside a resource can be referenced by providing the path to the resource and reference identification in the format, "path, resource_id". For example, if you wanted to use string resource 123 in Example.dll, you would use "Example.dll, 123". For more information about what icons are required and for tips on designing icons for Internet Explorer, see Toolbar Button Style Guide.

General Steps

The steps in this section must be followed when adding any toolbar buttons to the Internet Explorer user interface. If any information is omitted, the toolbar button will not be displayed.

Note  This tutorial describes how to add a menu item for all users. You can substitute HKEY_CURRENT_USER for HKEY_LOCAL_MACHINE in the steps below for settings that you want to make per user. Duplicate items found in HKEY_CURRENT_USER override those in HKEY_LOCAL_MACHINE .
  1. Create a valid GUID.

    You can use Guidgen.exe from Microsoft Visual Studio, or Uuidgen.exe from the Windows Software Development Kit (SDK).

  2. Create a new key (using the GUID as the name) in the registry under:
    HKEY_LOCAL_MACHINE
         Software
              Microsoft
                   Internet Explorer
                        Extensions
                             {GUID}

    {GUID} is the valid GUID that you created in step 1.

  3. Required. Create the following string values in the registry under the new key:
    • ButtonText - Set the value to the label you want for the toolbar button.
      HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\Extensions\{GUID}\ButtonText
      
    • HotIcon - Set the full path of the .ico file that contains the three color icons.
      HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\Extensions\{GUID}\HotIcon
      
    • Icon - Set the full path of the .ico file that contains the three grayscale icons.
      HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\Extensions\{GUID}\Icon
      
  4. Optional. The following values determine if the icon is initially visible.
    • Default Visible - To make the toolbar button to appear on the Internet Explorer toolbar by default, set Default Visible to "Yes", otherwise set Default Visible to "No".
      HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\Extensions\{GUID}\Default Visible
      
      Note  If the user has customized the toolbar, the button will not appear on the toolbar automatically. The toolbar button will be added to the choices in the Customize Toolbar dialog box and will appear if the toolbar is reset.
  5. Optional. To provide support for multiple native languages (like French or Japanese), complete the following steps to support different native languages:
    1. Determine the LCID of the native language you want to support. See Language Identifier Constants and Strings for a complete list.
    2. Create a new key, Lang####, using the LCID from the previous step in place of "####" in the registry as follows:
      HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\Extensions\{GUID}\Lang####
      

      For example, the key name should be Lang0411 for a Japanese implementation, since the LCID for Japanese is 0411.

Adding the Details

To complete the setup of the custom command, you must provide details of the action that takes place when the button is clicked. The values that you need depend on what the toolbar button is going to run. The following list contains links to the sections with the steps required to complete the addition of a toolbar button.

COM Objects

In order to invoke a Component Object Model (COM) object from Internet Explorer, it must implement IOleCommandTarget. Only one command is supported per object; the COM object's IOleCommandTarget::Exec is always called with nCmdID=0 and with VARIANT arguments set to NULL. Additionally, the implementation of IOleCommandTarget::QueryStatus is always called with cCmds=1.

If the COM object needs to access the browser or Dynamic HTML (DHTML) Object Model of the active page, it must implement IObjectWithSite. Internet Explorer calls IObjectWithSite::SetSite with a pointer to IShellBrowser.

The following steps are required to complete the creation of a toolbar button that implements a COM object.

  1. Register the COM object.
  2. Create a new string value, CLSID, in the registry as follows:
    HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\Extensions\{GUID}\CLSID
    

    Set the value of CLSID equal to {1FBA04EE-3024-11d2-8F1F-0000F87ABD16} to specify the CLSID_Shell_ToolbarExtExec extension class.

  3. Create a new string value, ClsidExtension, in the registry as follows:
    HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\Extensions\{GUID}\ClsidExtension
    

    Set the value of ClsidExtension equal to the GUID of the COM object.

Explorer Bars

The following steps are required to complete the creation of a toolbar button that opens an Explorer Bar.

  1. Create a new string value, CLSID, in the registry as follows:
    HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\Extensions\{GUID}\CLSID
    

    Set the value of CLSID equal to {E0DD6CAB-2D10-11D2-8F1A-0000F87ABD16} to specify the CLSID_Shell_ToolbarExtBand extension class.

  2. Create a new string value, BandCLSID, in the registry as follows:
    HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\Extensions\{GUID}\BandCLSID
    

    Set the value of BandCLSID to the CLSID of the Explorer Bar to open.

Note   All Explorer Bars have a menu item added to the View menu automatically.

Scripts

The following steps are required to complete the creation of a toolbar button that runs a script.

  1. Create a new string value, CLSID, in the registry as follows:
    HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\Extensions\{GUID}\CLSID
    

    Set the value of CLSID equal to {1FBA04EE-3024-11D2-8F1F-0000F87ABD16} to specify the CLSID_Shell_ToolbarExtExec extension class.

  2. Create a new string value, Script, in the registry as follows:
    HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\Extensions\{GUID}\Script
    

    Set the value of Script to the full path of the script to run.

To add a menu item in the Tools menu with the same functionality, see the Adding Menu Items tutorial.

Executable Files

The following steps are required to complete the creation of a toolbar button that runs an executable file.

  1. Create a new string value, CLSID, in the registry as follows:
    HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\Extensions\{GUID}\CLSID
    

    Set the value of CLSID equal to {1FBA04EE-3024-11D2-8F1F-0000F87ABD16} to specify the CLSID_Shell_ToolbarExtExec extension class.

  2. Create a new string value, Exec, in the registry as follows:
    HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\Extensions\{GUID}\Exec
    

    Set the value of Exec to the full path of the .exe file to run.

To add an item to the Tools menu with the same functionality, see the Adding Menu Items tutorial.

Related Topics

Community ContentAdd
plz Give Me Answer My Question
You can look at this articles
http://cgeers.wordpress.com/2008/02/16/internet-explorer-toolbar/
http://www.codeproject.com/KB/shell/dotnetbandobjects.aspx

Hope it helps

How To Adding Toolbar Buttons Internet Explorer using C#.Net()...


PLZ Help Me Friends... ... .( In Slides Way)... ... .


출처: http://msdn.microsoft.com/en-us/library/aa753588(v=VS.85).aspx
Posted by SB패밀리

Adding Explorer Bars 란 IE에 DeskBand bar를 추가하는 것을말한다.
툴바도 될 수 있고.....

Adding Explorer Bars

This tutorial explains how to add an Explorer Bar in Windows Internet Explorer. If you also want to create a toolbar button for the Explorer Bar, see the Adding Toolbar Buttons tutorial.

Requirements and Dependencies

Developers who want to add menu items to the Tools menu in Internet Explorer must be familiar with the registry. Developers should also be familiar with band objects. For more information on band objects, see the Windows Shell API documentation in the Windows Software Development Kit (SDK).

The implementation described here is valid for Microsoft Internet Explorer 5 or later. To learn how to implement Explorer Bars in Internet Explorer 4.0, see the band objects documentation in the Windows Software Development Kit.

Implementation Steps

The following list contains the steps for adding an Explorer Bar to Internet Explorer.

Icons and strings stored inside a resource can be referenced by providing the path to the resource and reference identification in the format "path, resource_id". For example, if you wanted to use string resource 123 in Example.dll, you would use "Example.dll, 123".

Note  

This tutorial describes how to add an Explorer Bar for all users. You can substitute HKEY_CURRENT_USER for HKEY_LOCAL_MACHINE in the steps below for settings that you want to make per user.

  1. Create a valid GUID.
  2. Create a new key, with the GUID as the name, in the registry under:

    HKEY_CLASSES_ROOT\CLSID\

    The result should look like:

    HKEY_CLASSES_ROOT\CLSID\<Your GUID>
    

    <Your GUID> is the valid GUID that you created in step 1.

    The default value of the key should be set to the name of the Explorer Bar in the View menu.

  3. Create a new key, Implemented Categories, under:

    HKEY_CLASSES_ROOT\CLSID\<Your GUID>

    The result should look like:

    HKEY_CLASSES_ROOT\CLSID\<Your GUID>\Implemented Categories
    
  4. Create a new key using the category identifier (CATID) of the type of Explorer Bar you are creating as the name of the key. This can be one of the following values:
    CATID Description
    {00021494-0000-0000-C000-000000000046} Defines a horizontal Explorer Bar.
    {00021493-0000-0000-C000-000000000046} Defines a vertical Explorer Bar.

    The result should look like:

    //for a horizontal Explorer Bar
    HKEY_CLASSES_ROOT\CLSID\<Your GUID>\
        Implemented Categories\{00021494-0000-0000-C000-000000000046}
    
    //for a vertical Explorer Bar
    HKEY_CLASSES_ROOT\CLSID\<Your GUID>\
        Implemented Categories\{00021493-0000-0000-C000-000000000046}
    
  5. Create a new key, InProcServer32, under:

    HKEY_CLASSES_ROOT\CLSID\<Your GUID>

    The result should look like:

    HKEY_CLASSES_ROOT\CLSID\<Your GUID>\InProcServer32
    

    Set the default value of the key to the full path of the Shdocvw.dll for HTML pages or the .dll file of the Explorer Bar.

  6. Create a new string value, ThreadingModel, under:

    HKEY_CLASSES_ROOT\CLSID\<Your GUID>\InProcServer32

    The result should look like:

    HKEY_CLASSES_ROOT\CLSID\<Your GUID>\InProcServer32\ThreadingModel
    

    Set the value of ThreadingModel to "Apartment".

  7. Create a new key, Instance, under:

    HKEY_CLASSES_ROOT\CLSID\<Your GUID>

    The result should look like:

    HKEY_CLASSES_ROOT\CLSID\<Your GUID>\Instance
    
  8. Required for Explorer Bars that display an HTML page, but optional otherwise. Create a new string value, CLSID, under:

    HKEY_CLASSES_ROOT\CLSID\<Your GUID>\Instance\

    The result should look like:

    HKEY_CLASSES_ROOT\CLSID\<Your GUID>\Instance\CLSID
    

    Set the value of CLSID to {4D5C8C2A-D075-11d0-B416-00C04FB90376}.

  9. Create a new key, InitPropertyBag, under:

    HKEY_CLASSES_ROOT\CLSID\<Your GUID>\Instance

    The result should look like:

    HKEY_CLASSES_ROOT\CLSID\<Your GUID>\Instance\InitPropertyBag
    
  10. Required for Explorer Bars that display an HTML page, but optional otherwise. Create a new string value, Url, under:

    HKEY_CLASSES_ROOT\CLSID\<Your GUID>\Instance\InitPropertyBag

    The result should look like:

    HKEY_CLASSES_ROOT\CLSID\<Your GUID>\Instance\InitPropertyBag\Url
    

    Set the value of Url to the location of the HTML file that contains the content for the Explorer Bar.

  11. Remove the following registry entries:
    HKEY_CLASSES_ROOT\Component Categories\
        {00021493-0000-0000-C000-000000000046}\Enum
    
    HKEY_CLASSES_ROOT\Component Categories\
        {00021494-0000-0000-C000-000000000046}\Enum
    
  12. Optional. Create a new key, using the GUID you created in step 1 as the name, in the registry under:

    HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\Explorer Bars

    HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\Explorer Bars\<Your GUID>
    
  13. Optional. Create a new binary value, BarSize, under:

    HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\Explorer Bars\<Your GUID>

    The result should look like:

    HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\Explorer Bars\<Your GUID>\BarSize
    

    Set the value of BarSize to an 8-byte binary value in hexadecimal notation that sets the default size for the Explorer Bar. The value is interpreted in pixels, so the value "97 00 00 00 00 00 00 00" would be equivalent to setting the default size of the bar to 151 pixels.

Related Topics

Community ContentAdd
Step 11 Incorrect for Vista/IE7

At least with Vista/IE7+ (haven't tested on IE 6 or XP), you need to delete the following keys to get the Explorer Bar recognized:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Discardable\PostSetup\
Component Categories\{00021493-0000-0000-C000-000000000046}\Enum
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Discardable\PostSetup\
Component Categories\{00021494-0000-0000-C000-000000000046}\Enum


출처 : http://msdn.microsoft.com/en-us/library/aa753590(v=VS.85).aspx

Posted by SB패밀리