Add button to Toolbar

Ask for help and post your question on how to use XnView Classic.

Moderators: XnTriq, helmut, xnview

meRobs
Posts: 43
Joined: Tue Mar 11, 2008 11:43 pm

Add button to Toolbar

Post by meRobs »

I would like to add a few buttons to the Browser Toolbar, maybe for Copy to, Move to and Toggle Thumbnails.
I realise that there is already a File Operation button, but it requires use of its drop-down menu.

In Options > Toolbar > Browser, I can use the drop down menu to add a Cmd (for Copy and Move to, etc), but where can I get suitable Icons for them?

Secondly, where can I find (or create) a Cmd for Toggle Thumbnails (preferably 'with labels')??

I would greatly appreciate help for this.
Thanks in advance.
Robin

I have version 1.97.5 in XP
User avatar
xnview
Author of XnView
Posts: 45039
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Add button to Toolbar

Post by xnview »

meRobs wrote:In Options > Toolbar > Browser, I can use the drop down menu to add a Cmd (for Copy and Move to, etc), but where can I get suitable Icons for them?
There is no icons, so you can use your own icon...
Secondly, where can I find (or create) a Cmd for Toggle Thumbnails (preferably 'with labels')??
Sorry there is no CMD for that
Pierre.
meRobs
Posts: 43
Joined: Tue Mar 11, 2008 11:43 pm

Re: Add button to Toolbar

Post by meRobs »

Thanks Pierre
I shall try and create or get an Icon from somewhere.
User avatar
XnTriq
Moderator & Librarian
Posts: 6401
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Add button to Toolbar

Post by XnTriq »

Taken from Windows XP's shell32.dll:
You do not have the required permissions to view the files attached to this post.
meRobs
Posts: 43
Joined: Tue Mar 11, 2008 11:43 pm

Re: Add button to Toolbar

Post by meRobs »

Thanks XnTriq!
I have just discovered the App: IconCollector and using it I was able to open shell32.dll.
However, I couldn't see your icons. You must have a different version of OS (I have XP SP3 Home).
Thanks again.
User avatar
XnTriq
Moderator & Librarian
Posts: 6401
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Add button to Toolbar

Post by XnTriq »

Hi meRobs :-)

Having extracted bitmap resource #215 from shell32.dll with an old freeware utility similar to these, ...
... I converted the resulting 32-bit BMP file with XnView to PNG format. Then I cropped the individual buttons and saved them as ICOs using an Icon Editor.
User avatar
XnTriq
Moderator & Librarian
Posts: 6401
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Add button to Toolbar

Post by XnTriq »

I've just found out that you don't need a specialized tool for extracting these resources. Just point Internet Explorer 6 @ Windows XP to the following addresses, and voilà:
  • Image
    res://shell32.dll/2/204
  • Image
    res://shell32.dll/2/205
  • Image
    res://shell32.dll/2/206
  • Image
    res://shell32.dll/2/207
  • Image
    res://shell32.dll/2/214
  • Image
    res://shell32.dll/2/215
  • Image
    res://shell32.dll/2/216
  • Image
    res://shell32.dll/2/217
If IE 7 or 8 is installed on your system, there should also be a file named ieframe.dll somewhere. Bitmap resources #214/#215 contain the Vista-style versions of the “Copy to” and “Move to” icons.
  • Image
    res://ieframe.dll/2/204
  • Image
    res://ieframe.dll/2/205
  • Image
    res://ieframe.dll/2/206
  • Image
    res://ieframe.dll/2/207
  • Image
    res://ieframe.dll/2/214
  • Image
    res://ieframe.dll/2/215
  • Image
    res://ieframe.dll/2/216
  • Image
    res://ieframe.dll/2/217
  • Image
    res://ieframe.dll/2/697
  • Image
    res://ieframe.dll/2/699
Can someone confirm this, please?
meRobs
Posts: 43
Joined: Tue Mar 11, 2008 11:43 pm

Re: Add button to Toolbar

Post by meRobs »

The shell32.dll images are also available in XP with IE 8
User avatar
XnTriq
Moderator & Librarian
Posts: 6401
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Add button to Toolbar

Post by XnTriq »

meRobs wrote:The shell32.dll images are also available in XP with IE 8
Turns out that IE can even extract resources form XnView's executable :o

Code: Select all

res://C:\Program%20Files\XnView\xnview.exe/2/ABOUTICON
Microsoft Knowledge Base ([url=http://support.microsoft.com/kb/220830]INFO: Syntax of the Res: Protocol and Some Known Related Issues[/url]) wrote:The Res: protocol specifies a resource that will be obtained from a module, and uses the following syntax:

Code: Select all

res://sFile[/sType]/sID
where the tokens for this code are as follows:
  • sFile. Path and file name of the module that contains the resource.
  • sType. Optional. String or numeric resource type. This can be either a custom resource, or one of the RT_ predefined resource types that is described in the FindResource function reference. If this parameter is not specified, the default resource type is RT_HTML.
  • sID. String or numeric identifier of the resource.