Advertisement

03.13.2001 at 03:15PM PST, ID: 20091171
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

show/hide menu

Tags: menu, hide
i have mdi application. Can child window hide/show (disable/enable) whole
menu?
Start your free trial to view this solution
Question Stats
Zone: Web Development
Question Asked By: mykapa
Solution Provided By: AlexVirochovsky
Participating Experts: 2
Solution Grade: A
Views: 11
Translate:
Loading Advertisement...
03.16.2001 at 07:19AM PST, ID: 5935258

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
03.17.2001 at 06:21AM PST, ID: 5937411

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
03.18.2001 at 06:52AM PST, ID: 5938658

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
03.18.2001 at 07:41AM PST, ID: 5938726

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
03.18.2001 at 07:45AM PST, ID: 5938736

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
03.18.2001 at 08:00AM PST, ID: 5938771

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
03.18.2001 at 09:27PM PST, ID: 5939856

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
03.18.2001 at 09:40PM PST, ID: 5939875

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
03.18.2001 at 10:14PM PST, ID: 5939932

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
03.20.2001 at 12:10PM PST, ID: 5943606

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
03.20.2001 at 09:53PM PST, ID: 5944806

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
03.20.2001 at 10:33PM PST, ID: 5944863

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
06.26.2001 at 06:13AM PDT, ID: 6227533

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
Microsoft
  • Internet Protocols
  • Applications
  • Development
  • OS
  • Hardware
  • Windows Security
Apple
  • Operating Systems
  • Hardware
  • Programming
  • Networking
  • Software
Internet
  • Search Engines
  • File Sharing
  • WebTrends / Stats
  • Spy / Ad Blockers
  • Web Browsers
  • New Net Users
  • Web Development
  • Chat / IM
  • Anti Spam
  • Web Servers
  • Anti-Virus
  • Email Clients
Gamers
  • Tips
  • Online / MMORPG
  • Puzzle
  • Emulators
  • Action / Adventure
  • Role Playing
  • Consoles
  • Game Programming
  • Strategy
  • Sports
  • Misc
  • Computer Games
Digital Living
  • Hardware
  • New Net Users
  • New Users
  • Software
  • Digital Music
  • Gaming World
  • Home Security
  • Apple
  • Networking Hardware
Virus & Spyware
  • Vulnerabilities
  • IDS
  • Encryption
  • Anti-Virus
  • Operating Systems Security
  • Software Firewalls
  • WebApplications
  • Cell Phones
  • Operating Systems
  • Internet
  • Hardware Firewalls
Hardware
  • Handhelds / PDAs
  • Displays / Monitors
  • Components
  • Networking Hardware
  • Peripherals
  • Laptops/Notebooks
  • Storage
  • Servers
  • Desktops
  • New Users
  • Misc
  • Apple
Software
  • System Utilities
  • Industry Specific
  • Network Management
  • Photos / Graphics
  • Page Layout
  • VMWare
  • Misc
  • Web Development
  • OS
  • CYGWIN
  • Voice Recognition
  • Message Queue
  • Quality Assurance
  • Security
  • Firewalls
  • MultiMedia Applications
  • Development
  • Database
  • Office / Productivity
  • Business Management
  • OS/2 Apps
  • Server Software
  • Internet / Email
ITPro
  • OS
  • Storage
  • Encryption
  • Operating Systems Security
  • Apple Hardware
  • Laptops & Notebooks
  • Servers
  • Networking Hardware
  • Peripherals
  • Devices
  • Displays / Monitors
  • WebTrends / Stats
  • Search Engines
  • Firewalls
  • WebApplications
  • IDS
  • Vulnerabilities
  • Email Clients
  • File Sharing
  • Spy / Ad Blockers
  • Web Browsers
  • Web Servers
  • Networking
  • Anti-Virus
  • Chat / IM
  • Anti Spam
Developer
  • Web Servers
  • Web Browsers
  • Game Programming
  • Dev Tools
  • Industry Specific
  • Office / Productivity
  • Database
  • CYGWIN
  • Web Development
  • Search Engines
  • File Sharing
  • WebTrends / Stats
  • Programming
  • Content Management
  • Application Servers
  • Protocols
Storage
  • Removable Backup Media
  • Storage Technology
  • Servers
  • Grid
  • Remote Access
  • Backup / Restore
  • Misc
  • Hard Drives
OS
  • Miscellaneous
  • Security
  • Development
  • Linux
  • VMWare
  • MainFrame OS
  • Unix
  • Apple
  • OS / 2
  • AS / 400
  • BeOS
  • Microsoft
  • VMS / OpenVMS
Database
  • Oracle
  • Miscellaneous
  • MySQL
  • Software
  • Sybase
  • Contact Management
  • PostgreSQL
  • Data Manipulation
  • Clarion
  • InterSystems Cache
  • Siebel
  • MUMPS
  • OLAP
  • SQLBase
  • SAS
  • GIS & GPS
  • 4GL
  • Berkeley DB
  • DB2
  • Informix
  • Interbase / Firebird
  • FoxPro
  • Reporting
  • LDAP
  • Filemaker Pro
  • MS SQL Server
  • dBase
  • MS Access
Security
  • Misc
  • Web Browsers
  • Software Firewalls
  • Operating Systems Security
  • File Sharing
  • Spy / Ad Blockers
  • Vulnerabilities
  • WebApplications
  • IDS
  • Anti-Virus
  • Encryption
  • Anti Spam
  • Email Clients
  • VPN
  • Chat / IM
Programming
  • Editors IDEs
  • Installation
  • Handhelds / PDAs
  • Multimedia Programming
  • System / Kernel
  • Algorithms
  • Game
  • Signal Processing
  • Project Management
  • Open Source
  • Database
  • Misc
  • Languages
  • Processor Platforms
  • Theory
Web Development
  • Scripting
  • Blogs
  • Web Servers
  • Software
  • Search Engines
  • Web Graphics
  • Images
  • Internet Marketing
  • Images and Photos
  • Components
  • Document Imaging
  • Web Languages/Standards
  • Illustration
  • WebApplications
  • Fonts
  • WebTrends / Stats
  • Authoring
  • Digital Camera Software
  • Miscellaneous
Networking
  • Protocols
  • Apple Networking
  • Network Management
  • Message Queue
  • Application Servers
  • Content Management
  • File Servers
  • Email Servers
  • Misc
  • Java Editors & IDEs
  • Wireless
  • Networking Hardware
  • Backup / Restore
  • System Utilities
  • ISPs & Hosting
  • Web Servers
  • Storage Technology
  • Removable Backup Media
  • Servers
  • Broadband
  • Grid
  • OS / 2
  • Novell Netware
  • Unix Networking
  • Windows Networking
  • Security
  • Telecommunications
  • Operating Systems
  • Linux Networking
Other
  • Community Advisor
  • Lounge
  • Community Support
  • New Net Users
  • Philosophy / Religion
  • Math / Science
  • Miscellaneous
  • URLs
  • Expert Lounge
  • Politics
  • Puzzles / Riddles
Community Support
  • Suggestions
  • New to EE
  • New Topics
  • Community Advisor
  • CleanUp
  • Announcements
  • General
  • Feedback
  • Input
  • EE Bugs
 
03.16.2001 at 07:19AM PST, ID: 5935258
which menu :   a system menu in the child window or a menubar ?

'cause you can change/modify menu , you could disable/enable a menu as well

see my web site for examples ( beginners for instance,  /* don't like word newbie :-)  */  )


HTH
JPaul
 
03.17.2001 at 06:21AM PST, ID: 5937411
I am agree with JPM: you can hide/show (in child) every
menu, becouse usually menu "connected" with client,
and you can easy get you client window,something as:
GetApplication->GetMainWindow()
 
03.18.2001 at 06:52AM PST, ID: 5938658
i want to hide all menus, because child window has a function, that has to work as fast as possible until user presses 'stop' button.

There is a line in that fuction : GetApplication()->PumpWaitingMessages(). But the problem is, that when menu is selected and the coresponding submenu pops out and the function stops (it continues after pressing releasing menu).

I want menu to be invisible while function is running.

I read in help about SetMenu(HMENU newMenu) function, that if newMenu is 0, the window's current menu is removed. So have tried to do like this:

GetApplication()->GetMainWindow()->SetMenu(0);

but this doesn't work.

I have solved this problem now by calling that function in a separate thread and everything works fine now, but now the child window has to disable all menu items, how to do that not writing all menu items in responce table?


 
03.18.2001 at 07:41AM PST, ID: 5938726
using another thread is a good idea.

for your last question, I guess there are differents ways ( I ain't try them out though )

-> there is EV_WM_ENTERIDLE
with void EvEnterIdle(uint source, HWND hwndDlg)
if source gets MSGF_MENU, then menu becomes inactive.

->you could use a SendMessage command in a loop with menuId  to disabling menu.

->or a loop using
bool EnableMenuItem(uint idItem, MF_DISABLED);

-> or bool RemoveMenu(uint idItem, uint flags);
Removes the menu item from the menu but does not delete it if it is a submenu.

->or you could use a SetMenu(NULL) to change menu to a new one which is 0.

HTH
JPaul
 
03.18.2001 at 07:45AM PST, ID: 5938736
1.I want menu to be invisible while function is running.
THis is not standart and notr so estethic. Better, I think,
make all menu disabled. For this I use simple
EV_COMMAND_ENABLE in Responce Table:

EV_COMMAND_ENABLE(CM_HELPABOUT, CmFileOpenEnable),
and
void TApp::CmFileOpenEnable(TCommandEnabler& tce)
{
  TGidonMDIClient* mdiClient = TYPESAFE_DOWNCAST(GetMainWindow()->GetClientWindow(), TGidonMDIClient);
            //exists client, and not error?
  if (mdiClient && !mdiClient->bStop)
    tce.Enable(true);
  else
    tce.Enable(false);
}
where bStop =false during working you function
2.>>how to do that not writing all menu items
in responce table?
Must be Responce table and must be
EV_COMMAND_ENABLE/EV_COMMAND lines.
Plus some menu items "linked" to Client, some to
apps, some to chield. Why it is problem??

 


 
03.18.2001 at 08:00AM PST, ID: 5938771
the problem is that 'stop' is private to child an app can't access it.

So i guess the easiest way to solve this problem is to make 'stop' accessable to app so it can disable all menu items when function is running.
 
03.18.2001 at 09:27PM PST, ID: 5939856
>>to make 'stop' accessable to app
Other simple solution use some function , say
bool GetStop   (){return stop}
and change code to something
TGidonMDIChield* mdiChield = TYPESAFE_DOWNCAST(mdiClient->()->GetActiveChield(), TGidonMDIChield);
bool bStop = mdiChield->GetStop();
 
03.18.2001 at 09:40PM PST, ID: 5939875
Alex is right with command enable using RESPONSE_TABLE : it's the common way.
but mykapa, you said not to using RESPONSE TABLE, right ?

and what about friend class to access private data?
 
03.18.2001 at 10:14PM PST, ID: 5939932
i think i'll do as Alex proposed, it is simple

i don't want to use responce table, because adding new menu items will be hard... i'll have to check for child's state in every item. So i wanted, that child will disable whole menu (if he does that in his responce table, then after modifying app i have to change all children classes).

And what about system menu? I want to disable it too.
Close command isn't disabled, but it doesn't work while child executes that function (child returns false in CanClose)
 
03.20.2001 at 12:10PM PST, ID: 5943606
>>I want to disable it too
For disable Close Button, make something as next in
you Client
class TMyFrame : public TDecoratedMDIFrame
{
public:
TMyFrame (TWindow* parent, const char * title, TWindow* client, bool
track_menu, TModule* module)
: TDecoratedMDIFrame (parent,title,client,module)
{
}
void SetupWindow ()
{
TDecoratedMDIFrame::SetupWindow();
SystemMenu.EnableMenuItem (SC_CLOSE, MF_GRAYED);
EnableWindow (false);
}
};


 
03.20.2001 at 09:53PM PST, ID: 5944806
why not disabling menu just when the function from the chlid menu response table is called?
the first  line you disable...the last one you restore or when user hits stop.
 
03.20.2001 at 10:33PM PST, ID: 5944863
i'd like to do like this. But how?
 
06.26.2001 at 06:13AM PDT, ID: 6227533
You can make something as:
HMENU hSystemMenu = GetApplication()-> GetMainWindow()->GetManu();
EnableMenuItem (hSystemMenu,SC_CLOSE, MF_GRAYED);
//your code
...
EnableMenuItem (hSystemMenu,SC_CLOSE, MF_ENABLED);
//restore
+ I hope, I 've replied by your main Q.
Alex
Accepted Solution
 
 
20080236-EE-VQP-29