Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Disable File Menu Item
#2
Found it in the forum:
int hm=GetMenu(hDlg) ;;menu bar
EnableMenuItem hm 1010 MF_GRAYED

When I try to enable menu item:
int hm=GetMenu(hDlg) ;;menu bar
EnableMenuItem hm 1010 MF_ENABLED

It does work, but it doesn't actually show the menu item in black until I mouse over the text.
This is being triggered by a change in QM Grid:
Code:
Copy      Help
,,case GRID.LVN_QG_CHANGE ;;when user changes grid content
,,int hm=GetMenu(hDlg) ;;menu bar
,,EnableMenuItem hm 1010 MF_ENABLED



Had to change my menu a bit: (Would disable "Save" under file, but not the one out in the open)
BEGIN MENU
>&File
&Publications : 1001
&Advertisers : 1002
<
>&Help
&View Help : 1005 0 0 F1
-
&About : 1006
<
Save : 1010 0 0
END MENU


I am having troubles with this: (it shows Ctrl+S in the menu in place of "Save" which is why I had "Save" under File menu)
BEGIN MENU
>&File
&Publications : 1001
&Advertisers : 1002
<
>&Help
&View Help : 1005 0 0 F1
-
&About : 1006
<
Save : 1010 0 0 Cs
END MENU


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)