1. Me wants pretty (popup) menus...

This is a multi-part message in MIME format.

------=_NextPart_000_001A_01C48F6F.7B80D8C0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 8bit

Hey earthlings!
I was wondering... how could I do a menuitem that has a picture+caption?
i.e.:

[pic] Description of pic

where [pic] is a 16x16 icon or bitmap or resource or whatever.
I have crawled around the Microsoft (shudders) PSDK docs, and I'm still
clueless.
Any help?

William Heimbigner
icxcnika at hotpop.com
Visit the UBoard - Forceful Signups Removed! - http://uboard.proboards32.com -
Threaded discussion, improved searching, human moderating, graphical smileys,
better formatting abilities (now what else was there...)
Visit my website: http://www.geocities.com/icxcnika123
------=_NextPart_000_001A_01C48F6F.7B80D8C0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: 8bit

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hey earthlings!</FONT></DIV>
<DIV><FONT face=Arial size=2>I was wondering... how could I do a menuitem that 
has a picture+caption?</FONT></DIV>
<DIV><FONT face=Arial size=2>i.e.:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>[pic] Description of pic</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>where [pic] is a 16x16 icon or bitmap or resource 
or whatever.</FONT></DIV>
<DIV><FONT face=Arial size=2>I have crawled around the Microsoft (shudders) PSDK
docs, and I'm still clueless.</FONT></DIV>
<DIV><FONT face=Arial size=2>Any help?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>William Heimbigner<BR><A 
href="mailto:icxcnika at hotpop.com">icxcnika at hotpop.com</A><BR>Visit the
UBoard -
Forceful Signups Removed! - <A 
href="http://uboard.proboards32.com">http://uboard.proboards32.com</A> - 
Threaded discussion, improved searching, human moderating, graphical smileys, 
better formatting abilities (now what else was there...)<BR>Visit my website: <A
href="http://www.geocities.com/icxcnika123">http://www.geocities.com/icxcnika123</A></FONT></DIV></BODY></HTML>

------=_NextPart_000_001A_01C48F6F.7B80D8C0--

new topic     » topic index » view message » categorize

2. Re: Me wants pretty (popup) menus...

William Heimbigner wrote:
> 
> This is a multi-part message in MIME format.

(Try using a plain text email format. It's much nicer to read than
all this ...)


> 
> Hey earthlings!
> I was wondering... how could I do a menuitem that has a picture+caption?
> i.e.:
> 
> [pic] Description of pic
> 
> where [pic] is a 16x16 icon or bitmap or resource or whatever.
> I have crawled around the Microsoft (shudders) PSDK docs, and I'm still
> clueless.
> Any help?
> 

I believe that that style of menu is not built-in to Windows, and thus
you have to do all the drawing yourself. Windows only has built support for
text-only or picture-only menu items, but not both.

To help you, Windows supports owner-drawn menus. This means that Windows
will send certain messages to your app when menus need to be drawn by
your application.

-- 
Derek Parnell
Melbourne, Australia

new topic     » goto parent     » topic index » view message » categorize

3. Re: Me wants pretty (popup) menus...

> Hey earthlings!
> I was wondering... how could I do a menuitem that has a picture+caption?
> i.e.:
> 
> [pic] Description of pic
> 
> where [pic] is a 16x16 icon or bitmap or resource or whatever.
> I have crawled around the Microsoft (shudders) PSDK docs, and I'm still
> clueless.
> Any help?
> 
> William Heimbigner
William,

You could try xControls by Don Phillips.  He's got a demo that shows how
to use picture menus.  I don't think it does popup menus, though.

Jonas

new topic     » goto parent     » topic index » view message » categorize

4. Re: Me wants pretty (popup) menus...

> > Hey earthlings!
> > I was wondering... how could I do a menuitem that has a picture+caption?
> > i.e.:
> > 
> > [pic] Description of pic
> > 
> > where [pic] is a 16x16 icon or bitmap or resource or whatever.
> > I have crawled around the Microsoft (shudders) PSDK docs, and I'm still
> > clueless.
> > Any help?
> > 
> > William Heimbigner
> William,
> 
> You could try xControls by Don Phillips.  He's got a demo that shows how
> to use picture menus.  I don't think it does popup menus, though.
> 
> Jonas

I dont know if that works anymore.  It was broken on the last release
of Win32Lib I think.  Something about eventLoop() not returning a value.

IE
C:\EUPHORIA\include\win32lib.ew:32364 in procedure WinMain()
eventLoop() does not return a value
... called from C:\EUPHORIA\xControls\Examples\PicMenu\PicMenuTst.exw:21

Where line 21 is the standard call to WinMain:
WinMain( TestWin, Normal )

The message is so vauge I have not been able to track the problem to
its source for correction.



Don Phillips - aka Graebel
     National Instruments
     mailto: eunexus @ yahoo.com

new topic     » goto parent     » topic index » view message » categorize

5. Re: Me wants pretty (popup) menus...

Don wrote:
> 
> > > Hey earthlings!
> > > I was wondering... how could I do a menuitem that has a picture+caption?
> > > i.e.:
> > > 
> > > [pic] Description of pic
> > > 
> > > where [pic] is a 16x16 icon or bitmap or resource or whatever.
> > > I have crawled around the Microsoft (shudders) PSDK docs, and I'm still
> > > clueless.
> > > Any help?
> > > 
> > > William Heimbigner
> > William,
> > 
> > You could try xControls by Don Phillips.  He's got a demo that shows how
> > to use picture menus.  I don't think it does popup menus, though.
> > 
> > Jonas
> 
> I dont know if that works anymore.  It was broken on the last release
> of Win32Lib I think.  Something about eventLoop() not returning a value.
> 
> IE
> C:\EUPHORIA\include\win32lib.ew:32364 in procedure WinMain()
> eventLoop() does not return a value
> ... called from C:\EUPHORIA\xControls\Examples\PicMenu\PicMenuTst.exw:21
> 
> Where line 21 is the standard call to WinMain:
> WinMain( TestWin, Normal )
> 
> The message is so vauge I have not been able to track the problem to
> its source for correction.

Ummmmm...eventLoop() is a private (not global) procedure (not function)
inside win32lib and has been so for a very long time. The recent
release of the library did not break this.

Also the PicMenuTst.exw program runs on my machine. However, it
did highlight a 'bug' in the win32lib library. Don, instead of using
w32Func(xGetSysColor,...) directly, can you please use the getSysColor() 
function instead? I've incorrectly changed the normal values of COLOR_...
forgetting that they were global constants. I'll correct them tomorrow.
But getSysColor() will work as expected.

Also, your demo is crashing when the PicMenu controls are being destroyed.
The API function DeleteMenu is returning a zero.

-- 
Derek Parnell
Melbourne, Australia

new topic     » goto parent     » topic index » view message » categorize

6. Re: Me wants pretty (popup) menus...

> Ummmmm...eventLoop() is a private (not global) procedure (not function)
> inside win32lib and has been so for a very long time. The recent
> release of the library did not break this.
> 
> Also the PicMenuTst.exw program runs on my machine. However, it
> did highlight a 'bug' in the win32lib library. Don, instead of using
> w32Func(xGetSysColor,...) directly, can you please use the getSysColor() 
> function instead? I've incorrectly changed the normal values of COLOR_...
> forgetting that they were global constants. I'll correct them tomorrow.
> But getSysColor() will work as expected.
> 
> Also, your demo is crashing when the PicMenu controls are being destroyed.
> The API function DeleteMenu is returning a zero.
> 
> -- 
> Derek Parnell
> Melbourne, Australia

Thanks for the heads up Derek,

Changing to getSysColor fixed the drawing issues I noticed awile back.
I was never able to trace the problem down.  I always thought something
funny was up in my drawing routines.

I still have no resolution for the DeleteMenu issue.  It also crashes on
my system, but I do not handle (in my routines) anything regarding the
removal of menus.  I only do processing on the drawing side of things.
I tried a couple of work arounds, but they dont seem to do anything.  Any
clues on what might be causing this?  As soon as this is ironed out I
will post up the fixes...


Don Phillips - aka Graebel
     National Instruments
     mailto: eunexus @ yahoo.com

new topic     » goto parent     » topic index » view message » categorize

7. Re: Me wants pretty (popup) menus...

> > Also the PicMenuTst.exw program runs on my machine. However, it
> > did highlight a 'bug' in the win32lib library. Don, instead of using
> > w32Func(xGetSysColor,...) directly, can you please use the getSysColor() 
> > function instead? I've incorrectly changed the normal values of COLOR_...
> > forgetting that they were global constants. I'll correct them tomorrow.
> > But getSysColor() will work as expected.
> > 
> > Also, your demo is crashing when the PicMenu controls are being destroyed.
> > The API function DeleteMenu is returning a zero.

Ok I corrected some code and it now runs on my machine as well.

1> Drawing issues have been resolved
2> Destroy menu error has a work around in place

I dont know why (ATM), but placing hooks into a Menu is creating the error
on exit.  The work around (for now) is not hooking Menus.  The library still
works for MenuItems.

I dont think this will effect anyone as it has not been drawing correctly
for awile now so obviously no one was using it else I would have heard
complaints about it =)

If anyone knows why hooking a Menu would cause a problem let me know and I
will see if I can correct my code to work with them also.  It should post
for download sometime this morning...


Don Phillips - aka Graebel
     National Instruments
     mailto: eunexus @ yahoo.com

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu