Board index » delphi » hiding pop menus-hiding

hiding pop menus-hiding

Hi
can someone tell me how to hide a pop menu?

I can hide a menu item eg DisableCommand (hmenus[MLOG],IDM_CLEARLOG);
but can assign a unique ID number for a popup in the resourse workshop and
so canot disable the popup menu.

I'm using BorlandC++ 4.5 and win16.
Thanks for any advice.

Steve

 

Re:hiding pop menus-hiding


OWL: I believe TMenu::~TMenu will do the work perfectly: just delete the
TMenu object.
Win32: ::DestroyMenu(...) will do the same if you have only handle.

Boris
Bo...@sirma.bg

Quote
"Steven Hodgson" <stev...@advancedengine.com> wrote in message

news:3a90837c_2@dnews...
Quote
> Hi
> can someone tell me how to hide a pop menu?

> I can hide a menu item eg DisableCommand (hmenus[MLOG],IDM_CLEARLOG);
> but can assign a unique ID number for a popup in the resourse workshop and
> so canot disable the popup menu.

> I'm using BorlandC++ 4.5 and win16.
> Thanks for any advice.

> Steve

Re:hiding pop menus-hiding


I only wish to disable the popup menu, not actually destroy it.

The problem I can not assign a unique ID number for a popup in the resourse
workshop.

Quote
"Boris Vidolov" <Bo...@sirma.bg> wrote in message

news:96ql88$gh72@bornews.inprise.com...
Quote

> OWL: I believe TMenu::~TMenu will do the work perfectly: just delete the
> TMenu object.
> Win32: ::DestroyMenu(...) will do the same if you have only handle.

> Boris
> Bo...@sirma.bg

> "Steven Hodgson" <stev...@advancedengine.com> wrote in message
> news:3a90837c_2@dnews...
> > Hi
> > can someone tell me how to hide a pop menu?

> > I can hide a menu item eg DisableCommand (hmenus[MLOG],IDM_CLEARLOG);
> > but can assign a unique ID number for a popup in the resourse workshop
and
> > so canot disable the popup menu.

> > I'm using BorlandC++ 4.5 and win16.
> > Thanks for any advice.

> > Steve

Re:hiding pop menus-hiding


Quote
> I only wish to disable the popup menu, not actually destroy it.

> The problem I can not assign a unique ID number for a popup in the
resourse
> workshop.

Hello,

You can try use the function
::SetMenuItemInfo(HMENU hMenu, UINT uItem, BOOL fByPosition, LPMENUITEMINFO
lpmii);
and pass the position of the popup instead of unique ID.

Also, try to pass as ID the ID of the first subitem in the popup minus one.

Jogy

Other Threads