News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

ownerdrawn menu

Started by evlncrn8, June 25, 2007, 05:01:01 PM

Previous topic - Next topic

evlncrn8

hi all, i've seen some posts on ownerdrawn stuff here, but the attachments on the posts seem non existant any more
if anyone has any source showing how to properly do owner drawn menus i'd be very grateful..
my own attempts seem work work, but then screw up on overlapping popup menus, submenu->another submenu
where it seems some clipping takes place (even though i disabled the clip region)

ta

ragdog

hi

do you look for ownerdraw menu of examples??


ragdog

drizz

XXControls has some really nice ownerdrawn stuff (including menus)
http://chib.hut1.ru/
The truth cannot be learned ... it can only be recognized.

evlncrn8

@ragdog - yes, preferably simple, just showing how to (properly) handle the WM_MEASUREITEM - i think i have that nailed though, and the WM_DRAWITEM (this part i think i have bug-ified heh), primarially its to work with popupmenus - but that shouldn't really matter, the main issue i have (as stated) is when the popupmenu has a sub menu (another popup) and it overlaps the 'parent', if i move the mouse quickly, the drawing is a bit screwed and it looks like some clipping region...

@drizz - i'll check out the site..

thanks to you both

donkey

Here's a demo of a font menu I wrote...



[attachment deleted by admin]
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

donkey

And one that uses a toolbar and runs vertically...



[attachment deleted by admin]
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

evlncrn8

cheers donkey, i'll go through the code and see if it sorts the overlap/clipping issue, its quite frustrating, but doesnt look good...

donkey

No Problem, but I do not understand what you mean by the "overlapping" problem. If you could post an example I would gladly take a look at it, it would get me away from the COM problems I am struggling with if only for a little while (I am trying to write a shell extension in assembly).
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

evlncrn8

got it fixed, thanks all

the problem was i wasn't handling the selection part properly, it looked like clipping, but wasn't, all the code pointed me in the right direction
thanks again all :)

shell extension in com is painful for sure donkey, i wish u all the luck with it, personally i just patch the registry portion with the shell command.. cheating i know, but it avoids all the painful 'registrations' etc..

ic2

Here's  one i found that seems easy to follow.

[attachment deleted by admin]

donkey

Quote from: evlncrn8 on June 26, 2007, 10:48:14 AMshell extension in com is painful for sure donkey, i wish u all the luck with it, personally i just patch the registry portion with the shell command.. cheating i know, but it avoids all the painful 'registrations' etc..

Yes, it is to say the least a painful experience, I have been at it for 3 days now and no end in site. But once I have a template it will be a useful tool for building IContextMenu handlers and that's about the only reason I'm still at it.
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

drizz

Hi donkey,

i wrote some code to handle IContextMenu. it's a real mess. see if you can find something of interest in it

Edit: forgot to add resources to the zip

[attachment deleted by admin]
The truth cannot be learned ... it can only be recognized.

donkey

Right on Drizz,

Thanks, you have relieved almost all of my pain. If you don't mind I will farm your interface.asm for code, I had some misconceptions that seem to have come from the half-assed docs at MSDN and went way overboard in my interface handling. Your code is much simpler than mine and in no way do I find it a mess.

Donkey
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

drizz

Quote from: donkey on June 26, 2007, 03:21:06 PMIf you don't mind I will farm your interface.asm for code
please do. btw, you can find some more samples at Japheth's site.
Quote from: donkey on June 26, 2007, 03:21:06 PMI have been at it for 3 days now and no end in site
something offtopic.. a log (meant to be a board post) i made during the making of that project.. i know how you feel  :bg
describes how frustrated i was..



[attachment deleted by admin]
The truth cannot be learned ... it can only be recognized.

donkey

I know exactly what you mean, here's my project to date. It just doesn't seem to work and I can't figure out why. Probably lost in some indirection myself :)

NOTE: GoAsm syntax

[attachment deleted by admin]
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable