Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Popmenu display

3 posts in Objects Last posting was on 2003-07-15 16:22:17.0Z
Doug_Stiers Posted on 2003-07-15 11:20:59.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: Doug_Stiers
Date: Tue, 15 Jul 2003 07:20:59 -0400
Subject: Popmenu display
Lines: 5
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Message-ID: <364_E98323C4A829A3A9003E588685256D64.003E589585256D64@webforums>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!webforums.sybase.com!news
Xref: forums-1-dub sybase.public.powerbuilder.objects:7484
Article PK: 734780

Is it possible to display an icon in a popmenu next to the menu item's
text? They want a context menu to look like Excel's shortcut menus do.

Thanks for any help,
Doug Stiers


Philip_Salgannik Posted on 2003-07-15 16:22:17.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: Philip_Salgannik
Date: Tue, 15 Jul 2003 12:22:17 -0400
Subject: Re: Popmenu display
Lines: 16
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Message-ID: <364_ADC540CB8966BF930059EE2A85256D64.0041C74185256D64@webforums>
References: <364_E98323C4A829A3A9003E588685256D64.003E589585256D64@webforums>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!webforums.sybase.com!news
Xref: forums-1-dub sybase.public.powerbuilder.objects:7487
Article PK: 734772

Yes it is possible. The only precondition - it has to be a submenu of the
menu on a currently opened window (where those bitmaps were already added).
You need to use several Windows APIs:
function int TrackPopupMenuEx ( ulong menuhandle, uint flags, int xx, int
yy, &
ulong windowhandle, long lptpm ) Library "user32.dll"
function ulong GetSubMenu ( ulong menuhandle, int itempos ) Library
"user32.dll"
FUNCTION ulong LoadImageA(ulong hintance, string filename,uint utype,int
x,int y,uint fload) LIBRARY "USER32.DLL"
FUNCTION boolean SetMenuItemBitmaps(ulong hmenu,uint upos,uint flags,ulong
handle_bm1,ulong handle_bm2) LIBRARY "USER32.DLL"
FUNCTION int GetSystemMetrics( int nIndex ) LIBRARY "USER32.DLL"
FUNCTION int GetSubMenu(ulong hMenu,int pos) LIBRARY "USER32.DLL"
FUNCTION ulong GetMenu(ulong hWindow) LIBRARY "USER32.DLL"


Andy Turiansky [TeamSybase] Posted on 2003-07-15 12:13:10.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: "Andy Turiansky [TeamSybase]" <aturiansky@comcast.net>
Organization: 192.195.217.10
X-Newsreader: AspNNTP 1.50 (Tri Hoang)
Subject: Re: Popmenu display
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Date: Tue, 15 Jul 2003 05:13:10 -0700
NNTP-Posting-Host: transinc-win02.netoptex.com 206.169.167.22
Lines: 16
Message-ID: <364_#feM2psSDHA.298@forums-2-dub>
References: <364_E98323C4A829A3A9003E588685256D64.003E589585256D64@webforums>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums-2-dub.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:7485
Article PK: 734776

Not that I am aware of... you may have to build your own object that simulates
the PopMenu..


On Tue, 15 Jul 2003 07:20:59 -0400,
in powersoft.public.powerbuilder.objects

<Doug_Stiers> wrote:
>Is it possible to display an icon in a popmenu next to the menu item's
>text? They want a context menu to look like Excel's shortcut menus do.
>
>Thanks for any help,
>Doug Stiers

- - -
Andy [TeamSybase]

Techwave 2003 - http://www.sybase.com/techwave2003
International Sybase User Group (ISUG) - http://www.isug.com
CodeXchange - http://powerbuilder.codeXchange.sybase.com/