Menu With Icons.

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

SetMenuItemBitmaps is the wrong way. When using default windows font settings the required bitmaps size is 13². This would be definitely too small.
User avatar
Valentino
Power Member
Power Member
Posts: 706
Joined: 2003-02-07, 00:21 UTC
Location: Ukraine

Post by *Valentino »

SetMenuItemInfo will help. Usual menu (not owner drawn). I did this. Here is the sample:

Code: Select all

// Load bitmap
int width = 16;
int height = 16;
HBITMAP hbm = (HBITMAP)LoadImage(hInstance, MAKEINTRESOURCE(IDB_BITMAP), IMAGE_BITMAP, width, height, 0);

// Set it to menu item
MENUITEMINFO mii;
mii.fMask = MIIM_BITMAP;
mii.hbmpItem = hbm;
if (!SetMenuItemInfo(hMenu, IDM_MENU_ITEM_COMMAND, FALSE, &mii))
{
    // Report the error
}
And you get nice color icons! BTW, check marks and radiobutton bullets can be added in addition to the icon.
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

ghisler(Author) wrote:slower and look worse
I made a quick and dirty program that demonstrates icons in menus.
Download: http://www.lefteous.de/tc/archives/iconmenu_demo/iconmenu_demo.sqx

Start the demo program from within TC. A menu file called WCMD_ENG.MNU must be placed in the same dir (Default English menu included in archive).

Remark: This demo is not complete and contains some glitches. It's just to demonstrate how it could look approximately. Is it really slow? Does it really look worse?

Technical information: Quick & dirty created with Borland Turbo C++ using standard VCL components (TMainMenu menus are owner drawn).

[mod]Some posts moved here from TC 7, beta1: A great tool becomes even greater...

Hacker (Moderator)[/mod]
Last edited by Lefteous on 2006-11-09, 01:00 UTC, edited 1 time in total.
User avatar
Stitscher
Power Member
Power Member
Posts: 1058
Joined: 2004-02-17, 12:34 UTC
Location: Hamburg, Germany

Post by *Stitscher »

Lefteous wrote: I made a quick and dirty program that demonstrates icons in menus.
Download: http://www.lefteous.de/tc/archives/iconmenu_demo/iconmenu_demo.sqx
Looks really impressive. 8)
Makes the menu much more comfortable.

Well done, Lefteous!
I'm curious about Ghislers reply. :lol:

Stitscher
User avatar
Sir_SiLvA
Power Member
Power Member
Posts: 3305
Joined: 2003-05-06, 11:46 UTC

Post by *Sir_SiLvA »

looks nice but u still would have to do ICONS for every command or u get something ugly like:
http://home.arcor.de/rosa.elefant/tc/pics/lefteous.jpg
Hoecker sie sind raus!
User avatar
StickyNomad
Power Member
Power Member
Posts: 1933
Joined: 2004-01-10, 00:15 UTC
Location: Germany

Post by *StickyNomad »

2Lefteous
:shock: :D
Hats off! very nice demo Lefteous!
Is it really slow?
nope.
Does it really look worse?
even more nope!

I really hope Christian will re-consider menu icons. They are indeed a great visual assistance when targeting menu entries.
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

Is it really slow? Does it really look worse?
I have tested it on a PII and it's as fast as the standard menu of TC, just like expected. Thanks for the demo.
looks nice but u still would have to do ICONS for every command or u get something ugly like:
Icons in menus are best used as anchors on which the eye can catch on so it's not really needed and also counterproductive to display an icon for every command in the menu.

Icfu
This account is for sale
User avatar
djk
Power Member
Power Member
Posts: 1651
Joined: 2003-03-17, 11:33 UTC
Location: Poland
Contact:

Post by *djk »

2Lefteous
Thanks :-)

2Sir_SiLvA
Most of other application (Opera, Maxthon, Word, Excel) use icons only for selected items in menu (the most important) and it doesn't seem to be ugly or strange.

2Christian
Think it over, please.
IMHO it won't make TC slower but (as other steps in TC7) it will improve TC appearance.
DJK
Totally addicted to Total Commander
totalcmd.pl
en.totalcmd.pl
TucknDar
Senior Member
Senior Member
Posts: 227
Joined: 2003-02-07, 09:44 UTC
Location: Oslo
Contact:

Post by *TucknDar »

Never been a fan of menu icons, but that sure does look good, Lefteous! Still as fast as it should be, and could help attract more TC users, as the old "TC looks so win3.1" myth might fade away... maybe? ;)
license #76904
User avatar
pdavit
Power Member
Power Member
Posts: 1529
Joined: 2003-02-05, 21:41 UTC
Location: Kavala -> Greece -> Europe -> Earth -> Solar System -> Milky Way -> Space
Contact:

Post by *pdavit »

Lefteous wrote:I made a quick and dirty program that demonstrates icons in menus.
It's perfect! Combine this with a vertical bar between panels and we have a full package of attraction!
"My only reason for still using M$ Window$ as an OS is the existence of Total Commander!"
Christian Ghisler Rules!!!
TychoBarfy
Senior Member
Senior Member
Posts: 347
Joined: 2005-08-13, 15:13 UTC
Location: Berlin, Germany
Contact:

Post by *TychoBarfy »

2Lefteous, thanks. Usefull little proggy.

Would be great if one could pass the name of the ini file. So one could use it not only as demo for the english wcmd_eng.mnu but also for other programs without the need of renaming the mnu file.

I.e.: IconMenu.exe -mnu=D:\path\to\sample.mnu

Or a right click context menu to select the mnu file.
-- TB --
User avatar
Hacker
Moderator
Moderator
Posts: 13081
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

Lefteous,
Even though I was not a great fan of icons in menus, after seeing your implementation, I changed my mind. Looks very very nice indeed. :)

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
HaPe
Junior Member
Junior Member
Posts: 30
Joined: 2004-12-23, 05:52 UTC
Location: Bavaria

Post by *HaPe »

Full support of this feature!

It would look great and it would be much faster to catch the wanted menu item!

Greetings,
HaPe
[x] nail here for new monitor
User avatar
StickyNomad
Power Member
Power Member
Posts: 1933
Joined: 2004-01-10, 00:15 UTC
Location: Germany

Post by *StickyNomad »

2Mods

Perhaps the grown menu-icon part of this thread should be merged with this recent thread: Menu with Icons...
djorge
Senior Member
Senior Member
Posts: 422
Joined: 2003-07-03, 12:48 UTC
Location: Portugal

Post by *djorge »

Great demo. I hope we will see this kind of menus someday in TC.
______________________
David Jorge
Personal License #117854
Post Reply