TOPIC: Check/uncheck menu items
#1549
Check/uncheck menu items 10 Months, 3 Weeks ago
I am use check/uncheck in popup menu, works fine. Try to do for mane menu and can not get it work. I use structure like this:

Controller
{
Name:MyController
New(){.....}
Title: MyController
Controls: .....
Commands: .....
Menu:
(
('&File',
'&Close')
('&Edit',
'&Undo', '&Redo', '',
'Cu&t', '&Copy', '&Paste', '', 'Refresh', 'Registration')
('&Window',
'&Win1', '&Win2')
)
... etc.

Can it work for menu 'Window' to use checkmark for show selected window (Win1 or Win2)? Thanks for any help!
 
 
#1550
Re:Check/uncheck menu items 10 Months, 3 Weeks ago
I think it is possible - other programs do it.

But I can not remember any examples of doing this in Suneido.

Have you tried using Window CheckPopupItem with GetPopupHandle ?
 
 
andrew
 
#1552
Re:Check/uncheck menu items 10 Months, 3 Weeks ago
I try with CheckMenuItem(menu, 1, MF.CHECKED) but not sure what to fill for 'menu'. Should be handle to menuitem, but can not get a handle. Should work if I find handle to selected item. Maybe handle is send when select item?
 
 
#1553
Re:Check/uncheck menu items 10 Months, 3 Weeks ago
Have you tried using Window CheckPopupItem with GetPopupHandle ?
Look at the CheckPopupItem and GetPopupHandle methods in the Window source code in stdlib. They look like they will do what you want.
 
 
andrew
 
#1576
Re:Check/uncheck menu items 10 Months, 3 Weeks ago
I check the code you mention but no result. I get handle (number) to my menu but no reaction i want to check/uncheck. For contextmenu i can do it,not for window menu. No problem, can do without it but would be nice to have. Thanks anyway!