Page 2 of 10

Posted: 2006-11-08, 11:23 UTC
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.

Posted: 2006-11-08, 17:19 UTC
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.

Posted: 2006-11-08, 23:49 UTC
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]

Posted: 2006-11-09, 00:02 UTC
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

Posted: 2006-11-09, 00:11 UTC
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

Posted: 2006-11-09, 00:18 UTC
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.

Posted: 2006-11-09, 00:31 UTC
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

Posted: 2006-11-09, 05:31 UTC
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.

Posted: 2006-11-09, 09:13 UTC
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? ;)

Posted: 2006-11-09, 09:20 UTC
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!

Posted: 2006-11-09, 11:20 UTC
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.

Posted: 2006-11-09, 11:45 UTC
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

Posted: 2006-11-09, 11:54 UTC
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

Posted: 2006-11-09, 11:57 UTC
by StickyNomad
2Mods

Perhaps the grown menu-icon part of this thread should be merged with this recent thread: Menu with Icons...

Posted: 2006-11-09, 12:03 UTC
by djorge
Great demo. I hope we will see this kind of menus someday in TC.