Hi,
I have a popup menu item on a menu that I populate with various items at
run-time (dependant on user choices). It all works nicely.
However, the update handlers are not working. I have the following code:
// In the message map
ON_UPDATE_COMMA ND_UI_RANGE(WM_ USER_MYPOPUP, WM_USER_MYPOPUP +
WM_USER_NUM_MYP OPUP -1, OnUpdateMyPopup )
// Lower down in he class
void CMyView::OnUpda teMyPopup(CCmdU I* pCmdUI)
{
if (pCmdUI != NULL)
{
// Trying to disable to the first entry in the list
if ((pCmdUI->m_nID - WM_USER_MYPOPUP ) == 0)
{
// We actually get in here...
pCmdUI->Enable(FALSE ); // This seems to have no effect,
so I try...
pCmdUI->m_pMenu->EnableMenuItem (0, MF_BYPOSITION | MF_GRAYED |
MF_DISABLED);
// ...but it doesn't work either!
}
}
}
Now when I load the application, my menu item is *not* visually disable, but
when you click it, it correctly does nothing. Why is it not visually
disabled? I also need to set a check against the last selected option, but
this is also not working.
Thanks in advance,
Alain 0 1288 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: dfg |
last post by:
Hi...Just a quick question about popup menus. I have a menu popup using
the code below:
Private Sub fraAccBal_MouseDown(Button As Integer, Shift As Integer, X
As Single, Y As Single)
If Button = 2 Then
PopupMenu mnuHi
End If
End Sub
|
by: ouech |
last post by:
hi,
i finally tryied with a popup menu but i have a problem.
i popup it with TrackMenuPopup and i create it from a ressource.
but it doesn't look as it should. i d'ont have the names of
the menu categories, only a small rect appears but with nothing
wrote in. when i pass on with the cursor, it popup the sub-menu
quite far from the small rect, but the submenu is good looking.
|
by: Dino M. Buljubasic |
last post by:
I have several context menu added to my forms. The forms are displaying
items in a list view.
When I click on an item in a list view, a popup context menu shows allowing
me to chese between editing or deleting the item from the list view. That
works fine.
However, I noticed that I can call the pop up context menu also by right
clicking on a list view item, just as it works by left clicking on it.
However it this case my application...
|
by: SamSpade |
last post by:
I use to get popup events when I checked out the menu coding.
That was a while ago. Something I did in the interim must have suppressed
those events because I just noticed I don't get them any more.
What could I do that will cause menu item Popup events not to be raised?
I've been looking but really don't know where to look anymore.
Second question.
A control has a context menu.
|
by: Alain Dekker |
last post by:
Hi,
I have a popup menu item on a menu that I populate with various items at
run-time (dependant on user choices). It all works nicely.
However, the update handlers are not working. I have the following code:
// In the message map
ON_UPDATE_COMMAND_UI_RANGE(WM_USER_MYPOPUP, WM_USER_MYPOPUP +
WM_USER_NUM_MYPOPUP -1, OnUpdateMyPopup)
| |
by: Nalaka |
last post by:
Hi,
I suddenly started getting a lot of errors from html validation (some CSS)
so I followed the following instructions to disable it.
If you'd rather not have these types of HTML validation errors show up in
your error-list, you can disable this functionality by selecting the
Tools->Options menu item in VS or Visual Web Developer. Select the
TextEditor->Html->Validation tree option in the left-hand side of the
|
by: RahimAsif |
last post by:
I am writing an application that requires the a portion of the main
menu to be dynamic. The menu has file, panels, view files and help
across the top. The view files sub menu needs to be dynamically
generated, and the dynamic generation needs to occur right when the
user selects this menu item (that is on the Popup event handler).
However, everytime I put following code on the Popup event handler (of
the View Files menuitem) to dynamically...
|
by: SQACSharp |
last post by:
I'm trying to automate an action in Internet Explorer.... I'm trying
to click an image that open a popup menu. The html code of the iimage
look like like <img blabla..OnClick="ShowMenu()"/>
I can click the image but my application is "sleeping" until I
manually click an item in the popup menu.
My code :
//--------------------------------//
|
by: benfly08 |
last post by:
Hi,
I used SWT to develop an windows application. In the application there is a dynamic created popup menu. The dynamic part is that i will pass a list of name to be a submenu of one menu item. However, when I code selection event, i cannot access to the list i pass in. Anybody got idea? Below is the code.
public static void setUpMenu(final Shell shell, Menu popUpMenu, final String clientId) {
myShell = shell;
...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |