I currently have some toolbar buttons with a small arrow on the side (TBSTYLE_EX_DRAWDDARROWS
) that, when clicked, result in a popup context menu being displayed under the button. This is done by constructing a custom popup menu and calling TrackPopupMenu
.
The client now wants to be able to select multiple options from the menu before it closes, so that multiple options can be be modified without the need to re-open the menu and wait for an intermediate redraw between each change.
For example:
- User clicks dropdown button
- Dropdown menu appears (modal, waits indefinitely for user action)
- User clicks some item (e.g., toggle a checkmark)
- Timer (e.g., 500ms) starts
- If timer expires, the menu is closed and all selected actions are executed.
- User clicks another item before the timer expires, go back to 4.
The best I can come up with is to redisplay the menu by calling TrackPopupMenu
multiple times. This makes the menu "flicker" when you select an item, and will probably require me to start a thread in order to do the timeouts, which I would rather avoid.