02-10-2012, 12:51 AM
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:
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
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:
,,case GRID.LVN_QG_CHANGE ;;when user changes grid content
,,int hm=GetMenu(hDlg) ;;menu bar
,,EnableMenuItem hm 1010 MF_ENABLEDHad 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
