We know every menu item will have a checkbox associated with it.
I have a trend control. When ever the user right clicks on it i will load a menu. the loaded up menu will have a main menu (menu1), and a sub menu (menu2) in it. i used TrackPopupMenu function to track both the main menu (menu1) and the submenu (menu2)
cmd = TrackPopupMenu(menu1->GetSafeHmenu(), TPM_LEFTALIGN | TPM_RIGHTBUTTON | TPM_RETURNCMD, point.x, point.y, NULL, m_ScrollBar.GetSafeHwnd(), NULL);
Switch cmd:
{
}
My menu1 has two item 1.)Properties and 2.)Submenu (menu2)
My submenu (menu2) has 4 items
1.)Pen1
2.)Pen2
3.)Pen3
4.)Pen4
When ever the user selects any one of the 4 pens, the pen on the trend resizes. Everything is working fine. Now the user can resize more than one pens at the same time. So now i added a 5th item to my submenu (menu2) and wehneevr the user clicks on the 5th items then only the pens resizes.
Well my idea is, if user clicks on pen1 or pen2 or pen3 or pen4, those menu items checkbox will be enbled or disabled every consecutive times, and when he clicks on 5th item the pens resizes depending if their checkboxes(pen1 or pen2 or pen3 or pen4) are checked or not.
As far as i know clicking on amneu item is one shot. When i click on pen i am checking it, but the menu disppears. If i call the TrackPopupMenu with a different cmd i can see the menu again with the checked box,
cmd2 = TrackPopupMenu(menu1->GetSafeHmenu(), TPM_LEFTALIGN | TPM_RIGHTBUTTON | TPM_RETURNCMD, point.x, point.y, NULL, m_ScrollBar.GetSafeHwnd(), NULL);
Switch cmd2:
{
}
but if user clicks again the whole menu disappers again. My question is is there anyway that there is a multiple selcetion menu item instead of one shot, is there any other way we can do this?
Experts help me please!!