473,493 Members | 4,319 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

CMenu

Here is the setup to my problem.

I created a menu item "ParPort" on the standard menu toobar that the MFC wizzard generates when you create an application. In the CMainFrame class I disable the menu item. In my view class I have a handler for a button. The idea is when the button is clicked the On_Command handler will reenable the menu item. Below is the code I wrote:

CMenu menu;
menu.LoadMenu(IDR_MAINFRAME); // IDR_MAINFRAME is the resource ID for
main menu
menu.EnableMenuItem(ID_PARPORT, MF_ENABLED); // ID_PARPORT is the resource id for the menu item I want to enable.

Unfortunately the above does not Work. Could some one please tell me what I'm doing wrong


Nov 17 '05 #1
0 849

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2565
by: shade | last post by:
Hello. I am new to Perl and having a lot of trouble finding a terminal based menuing system. Here's what I'm trying to do... I'm coding a web application to assist with Unix systems...
7
2698
by: Marci | last post by:
I found this script for cascading menus, however, I cannot reach the author to solve the bug I am having when I add a second menu to it. My problem is this: If I click on the first link, the...
1
2064
by: Vince | last post by:
Hi, I have a templated class implemented in one file called CDynWnd.h and declared like this : CDynWnd.h (declaration and implementation) ------------ template <class BASECLASS> class...
5
4303
by: Iain | last post by:
I would like to prevent the user from closing MDI child windows. However, I would like them to be able to minimize and maximize them. Setting the Control Box to false removes the minimize and...
2
1338
by: chaoy | last post by:
Hi, I created a user control as my site header. The user control consists a custom control, cmenu. I have tried using table to center the cmenu, and no luck. The cmenu just uses top=xxx, and...
5
6558
by: Vinay | last post by:
Hi, I have created a Context Menu class (CMenu) with relevant items. Based on a selected Item, I am taking a separate action. The following code is working fine. CMenu(sOption as string)...
7
2660
by: Mike Eaton | last post by:
Hi All, I have a simple application that allows users to clock in and out and stores the data for use by the payroll department. It spends most of its life as a tray icon and when the user...
3
3474
by: strongfrakk | last post by:
Hi All, I have problem with subject .( The code seems like good. For example: cmenu.as class cmenu { public var menuitemarray;
9
7402
by: sasimca007 | last post by:
Hello friends, I want to bulid a page that is restricted with right click. That means, any where on page right click is restricted. How to do that? If...
0
7157
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7192
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6862
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5452
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4886
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3078
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1397
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
637
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
282
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.