I've revamped my ownerdraw menu sample:

1. Squashed some bugs.
2. Made the source more readable.
3. It should even be a little faster.

Should I do a "Longhorn" owner draw menu sample? Or will it be in vain?

:alright:

Xtreme
Posted on 2004-01-27 15:10:52 by Xtreme
They are just pretty pretty amazing! :D..:tongue: Excelent! :D
Posted on 2004-02-24 13:16:39 by JaiKMw
Thank You!

If you have any additional ideas let me know and I update it again.

Glad you liked it...
Posted on 2004-02-24 13:21:26 by Xtreme
Hi.:)... since the code is about 15k (Longhorn), i was thinking something, but, i don't know oif it's a good idea, here it goes, my idea is to make a full stylish menu, maybe with a border, and a different bg (in all menu) and different type/color font. Although you can make a Longhorn/Whidbey toolbar menu :D, that'll be just incredible :alright: , and what (in my 2 months of learning asm) my dream :) , hope you like my idea :) see ya Xtreme :tongue:
Posted on 2004-02-26 15:50:43 by JaiKMw
Hi Xtreme,

Just one word - Posted on 2004-02-26 16:26:56 by donkey
JaiK, backgrounds for menus? :-s
Be careful you don't overload your programs with graphics, you risk that they end up looking very tacky... just like what happened when all those various delphi components came out - suddenly everybody had "win98 style fading captions" (even when disabled in the control panel), textured toolbars, buttons, ... - it was usually pretty bad, and when the people had no graphical skills/taste (which was the rule rather than the exception >_<).

It's okay when not overdone and classy, like this menu from XTreme. I still prefer when people let the OS and User selection handle which kind of menus, buttons (etc) appear in a program, but then again I'm the kinda guy that disables all the effects and animation in WinXP :)
Posted on 2004-02-26 16:34:18 by f0dder
You guys should also see...

http://www.masmforum.com/viewtopic.php?t=1865

or

http://home.ec.rr.com/abarfield/



EDIT: Good point f0dder - like when I disable the MediaPlayer
visualization so listening to a MP3 doesn't consume half
my available RAM!
Posted on 2004-02-26 16:37:57 by Xtreme
Yeah, after all i think you're right f0dder :tongue: , i am like that kinda guy too :) , but... can the longhorn/whidbey toolbar menues idea stay ? :), what do you think guys?...:alright:
Posted on 2004-02-26 21:33:32 by JaiKMw
Well, Microsoft uses undocumented functions to do their
owner drawn menus. These are the same functions used
to draw the Start menu (you can tell in IE because the
icon gets a blue background along with the rest of the
highlighted item like the Start menu). Therefore the system
already has these functions in memory at startup and it
doesn't make much of a difference (system wide) if they're
used or not.

As for us lowly :mad: 3rd-party programmers, ALL of our OD
stuff is in addition to everything else and can certainly cause
a slow-down if done to excess...
Posted on 2004-02-26 22:18:09 by Xtreme
Xtreme: thanks for sharing. great work !
Posted on 2004-02-27 01:09:25 by TBD
Hey Xtreme :) even though M$ uses undocumented functions :mad: , you owner drawn menues are pretty excellent, i don't think they could be has done a menues like that :), and i don't think that if you overload the menues with graphics or simple color bg, you're gonna slow donw the menues too much :tongue: :alright: ...
Posted on 2004-02-27 13:53:28 by JaiKMw
Hi Xtreme,

I had a chance to look into the code for your menus today and found that you are not properly releasing resources.

1. When deleting a bitmap it must be selected out of the DC first or the memory cannot be released afterwards
2. You should delete brushes and pens, selecting them out of the DC first

I noticed that on my Win98 SE box, after opening and closing the menu about 5 or 6 times it was eating up about 50% of system resources. This problem would not be evident on NT based systems but memory would still be eaten.
Posted on 2004-03-31 23:53:10 by donkey
Thanks Donkey!

I guess this C# stuff I'm into now is causing some bad habits to develop.

Needless to say, you guys have taught me better than that.
Posted on 2004-04-01 00:33:26 by Xtreme
Hi Xtreme,

I was palying around with Retro-fitting resource based dialog menus to use your menu style and came up with this. There were a few obstacles in Win98SE and generally. First I needed a way to reliably measure the menu text in case of long strings. Second the handling of separators had to allow for non-zero ID values as some people use 65535. Third the menus had to be dynamically re-styled using an enumerator to allow the text to be properly handled under Win9x, this only applies to resource menus. And finally I fixed up the GDI leaks.

I don't use the push/push/call method so they have been replaced by invokes, in GoAsm this does not present the same problems as in MASM. The syntax is GoAsm as that is the assembler I use but should be easy to translate. I replaced all of the .IF/.ELSEIF/.ENDIF statements with test/cmp/jxx as GoAsm does not support high level constructs. All in all it came out rather nicely, I played with the tri-vertex colors a bit for a different look but they can be set back to your values.
Posted on 2004-04-02 11:59:24 by donkey
HEy that's a cute job Donkey :), i love that menues :) :alright:
Posted on 2004-04-02 17:07:53 by JaiKMw
Cool/greate job :alright:
Posted on 2004-04-02 17:34:58 by bj1500