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.

Menu Handle

4 posts in Objects Last posting was on 2003-04-11 15:18:16.0Z
Mihrap Posted on 2003-04-03 13:07:19.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: "Mihrap" <postasepetim@yahoo.com>
Subject: Menu Handle
Date: Thu, 3 Apr 2003 16:07:19 +0300
Lines: 8
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: 81.212.10.110
Message-ID: <364_#gwfSJe#CHA.283@forums-1-dub>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums-1-dub.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:7307
Article PK: 734597

m_menu lm_x
lm_x = Create m_menu

How can I get handle of the object lm_x? Handle(lm_x) gives zero. Is there
any way...?


Steve_Katz_[TeamSybase] Posted on 2003-04-08 17:03:59.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: Steve_Katz_[TeamSybase]
Date: Tue, 8 Apr 2003 13:03:59 -0400
Subject: Re: Menu Handle
Lines: 14
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Message-ID: <364_947D1427B0E3BC85005DBFDC85256D02.004DE5F985256CFD@webforums>
References: <364_#gwfSJe#CHA.283@forums-1-dub>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!webforums.sybase.com!news
Xref: forums-1-dub sybase.public.powerbuilder.objects:7313
Article PK: 734603

>>m_menu lm_x
lm_x = Create m_menu

How can I get handle of the object lm_x? Handle(lm_x) gives zero. Is there
any way...?
<<

You cannot create standalone graphic objects dynamically and get a valid
windows handle to them. Menu is a graphic object.

What are you trying to do?

steve
[TeamSybase]


Mihrap Posted on 2003-04-11 09:25:54.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: "Mihrap" <postasepetim@yahoo.com>
Subject: Re: Menu Handle
Date: Fri, 11 Apr 2003 12:25:54 +0300
Lines: 24
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: mstr195175-30325.dial-in.ttnet.net.tr 195.175.198.118
Message-ID: <364_egHKU0AADHA.318@forums-2-dub>
References: <364_#gwfSJe#CHA.283@forums-1-dub> <364_947D1427B0E3BC85005DBFDC85256D02.004DE5F985256CFD@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:7316
Article PK: 734605

I am trying to change the background color of the menu without changing the
system color set. Here is the code and it works if I have valid menu handle

MENUINFO mi
Long flags
Long clrref

Boolean bIncludeSubmenus = True

OleTranslateColor(al_color, 0, clrref)
flags = MIM_BACKGROUND
If bIncludeSubmenus Then
flags = BitwiseOR( flags,MIM_APPLYTOSUBMENUS)
End If

mi.cbSize = 28
mi.fMask = flags
mi.hbrBack = CreateSolidBrush(clrref)

SetMenuInfo(al_handle, mi)

DrawMenuBar(al_handle)


Steve_Katz_[TeamSybase] Posted on 2003-04-11 15:18:16.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: Steve_Katz_[TeamSybase]
Date: Fri, 11 Apr 2003 11:18:16 -0400
Subject: Re: Menu Handle
Lines: 30
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Message-ID: <364_941618A053308E7E0054117385256D05.00384A9385256D05@webforums>
References: <364_#gwfSJe#CHA.283@forums-1-dub> <364_947D1427B0E3BC85005DBFDC85256D02.004DE5F985256CFD@webforums> <364_egHKU0AADHA.318@forums-2-dub>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!webforums.sybase.com!news
Xref: forums-1-dub sybase.public.powerbuilder.objects:7319
Article PK: 734609

To get a handle to the window's menu at runtime, I would suggest using the
GetMenu() API call passing Handle(w_whatever). You can try playing with
w_whatever.MenuId or Handle(w_whatever.MenuId) but I'm not sure if that
will work or not.

steve
[TeamSybase]

>>I am trying to change the background color of the menu without changing
the system color set. Here is the code and it works if I have valid menu
handle
MENUINFO mi
Long flags
Long clrref

Boolean bIncludeSubmenus = True

OleTranslateColor(al_color, 0, clrref)
flags = MIM_BACKGROUND
If bIncludeSubmenus Then
flags = BitwiseOR( flags,MIM_APPLYTOSUBMENUS)
End If

mi.cbSize = 28
mi.fMask = flags
mi.hbrBack = CreateSolidBrush(clrref)

SetMenuInfo(al_handle, mi)

DrawMenuBar(al_handle)
<<