1. ATTN Derek: Win32Lib Menu Bitmaps
I would like to be able to use bitmaps in MenuItems, like those in Word, or
WinZip. I looked
into doing it through the API, but it confused the hell out of me, since I don't
understand
structures and all that.
~Greg
g.haberek at comcast.net
2. Re: ATTN Derek: Win32Lib Menu Bitmaps
On Mon, 24 Feb 2003 18:10:36 -0500, Greg Haberek <g.haberek at comcast.net>
wrote:
>
> I would like to be able to use bitmaps in MenuItems, like those in Word,
> or WinZip. I looked
> into doing it through the API, but it confused the hell out of me, since
> I don't understand
> structures and all that.
The good news is that you are not weird - the API would confuse even Bill
Gates himself. The bad news is that to have both bitmaps and text in the
same menu item means you have to do an Owner Drawn Menu ITem, and that is
NOT a trivial bit of coding.
In short, there is no easy way to do this. Unfortunately don't have the
time right now to knock out a demo program so maybe somebody else has
already done this (maybe).
--
cheers,
Derek Parnell
3. Re: ATTN Derek: Win32Lib Menu Bitmaps
Hi Greg,
I have written to this list around 5 times donating a routine for doing
this. Infact, i was convincing Derek to add it to the win32lib but it seemed
trivial. Anyway, i also have a written win32lib example that comes with my
old low level routines library. check the user contributions and i'm sure
you will find it.
Jordah
----- Original Message -----
From: "Derek Parnell" <ddparnell at bigpond.com>
To: "EUforum" <EUforum at topica.com>
Subject: Re: ATTN Derek: Win32Lib Menu Bitmaps
>
> On Mon, 24 Feb 2003 18:10:36 -0500, Greg Haberek <g.haberek at comcast.net>
> wrote:
>
> >
> > I would like to be able to use bitmaps in MenuItems, like those in Word,
> > or WinZip. I looked
> > into doing it through the API, but it confused the hell out of me, since
> > I don't understand
> > structures and all that.
>
> The good news is that you are not weird - the API would confuse even Bill
> Gates himself. The bad news is that to have both bitmaps and text in the
> same menu item means you have to do an Owner Drawn Menu ITem, and that is
> NOT a trivial bit of coding.
>
> In short, there is no easy way to do this. Unfortunately don't have the
> time right now to knock out a demo program so maybe somebody else has
> already done this (maybe).
>
> --
>
> cheers,
> Derek Parnell
>
>
>
> TOPICA - Start your own email discussion group. FREE!
>
4. Re: ATTN Derek: Win32Lib Menu Bitmaps
On Fri, 21 Mar 2003 01:42:42 -0000, <jordah at btopenworld.com> wrote:
>
> Hi Greg,
> I have written to this list around 5 times donating a routine for doing
> this. Infact, i was convincing Derek to add it to the win32lib but it
> seemed
> trivial. Anyway, i also have a written win32lib example that comes with
> my
> old low level routines library. check the user contributions and i'm sure
> you will find it.
>
I'm sorry Jordah, if you think that I've deliberately excluded your
contribution to the library. Please realize that it is only through my
misunderstanding that I was not even aware that such an example of menu
bitmaps was available.
What I'd like to do, is to provide assistance in win32lib for owner drawn
objects, in a generic sense. I can then use that (as your example does
demostrate) to provide in-built support for bitmaps in menus, tabitems and
statusbar panels.
--
cheers,
Derek Parnell
5. Re: ATTN Derek: Win32Lib Menu Bitmaps
----- Original Message -----
From: "Derek Parnell" <ddparnell at bigpond.com>
To: "EUforum" <EUforum at topica.com>
Subject: Re: ATTN Derek: Win32Lib Menu Bitmaps
>
> On Fri, 21 Mar 2003 01:42:42 -0000, <jordah at btopenworld.com> wrote:
>
> >
> > Hi Greg,
> > I have written to this list around 5 times donating a routine for doing
> > this. Infact, i was convincing Derek to add it to the win32lib but it
> > seemed
> > trivial. Anyway, i also have a written win32lib example that comes with
> > my
> > old low level routines library. check the user contributions and i'm
sure
> > you will find it.
> >
>
> I'm sorry Jordah, if you think that I've deliberately excluded your
> contribution to the library. Please realize that it is only through my
> misunderstanding that I was not even aware that such an example of menu
> bitmaps was available.
It's ok, I brought up the issue in the wrong time. It was around the time
that win32lib had a lot of bugs and gdi leaks. So, u must have been
stressed...blah..blah...etc
Anyway,
I think (what i'll attempt in euwin), is to create a new event handle
eg wmOwnerPaint, similarly in win32lib w32H_OWNERPAINT. When trapping the
WM_DRAWITEM message, the variable params(variable params of called
routine_id), will carry the {DC,{x,y,cx,cy},userdata....}. ie the elements
of the DRAWITEMSTRUCT structure(lParam). With this done, the new user and
advanced users can perform gdi operations on their controls....setfont()...
I think you will have to take extra gdi management for the owner-draw
controls...This won't slow down the perfomance a lot since u will be doing
it within the WM_DRAWITEM message other than congested WM_PAINT message.
If you really didn't want to break existing code then you could create
new controls eg menuitemex,tabitemex. that could take bmpfilenames or
handles as parameters of the create() then auto matically do the drawing
etc......
I HTH.........
Jordah
>
> What I'd like to do, is to provide assistance in win32lib for owner drawn
> objects, in a generic sense. I can then use that (as your example does
> demostrate) to provide in-built support for bitmaps in menus, tabitems and
> statusbar panels.
>
> --
>
> cheers,
> Derek Parnell
>
>
>
> TOPICA - Start your own email discussion group. FREE!
>
>