|
I'm not really sure what I should pass as the parameters for CXTPComamndBars::TrackPopupMenu.
The problem:
I have a (split) view inside a frame. My context menu has some non-button controls on it (a button popup).
The following combinations cause the menu to work fine, except the non-button controls appear as buttons.
- view as pWnd, null as pWndOwner, null as pCommandBars
- frame as pWnd, view as pWndOwner, null as pCommandBars
- frame as pWnd, view as pWndOwner, frame->GetCommmandBar() as pCommandBars
- null as pWnd, view as pWndOwner, frame->GetCommmandBar() as pCommandBars
All of the following combinations cause the split button to appear correctly, but the view doesn't get WM_COMMAND messages:
- frame as pWnd, null as pWndOwner, null as pCommandBars
- view as pWnd, frame as pWndOwner, null as pCommandBars
- view as pWnd, null as pWndOwner, frame->GetCommmandBar() as pCommandBars
- null as pWnd, null as pWndOwner, frame->GetCommmandBar() as pCommandBars
From what I can tell, pWnd is the window that gets the messages,
unless pWndOwner is non-null, in which case that's the window that gets
the messages, unless pCommandBars is non-null, and pWndOwner is null,
in which case the owner of the command bars gets the message
If this is the case, then it seems pCommandBars and pWndOwner are
mutually-exclusive. If that is true, then there should really be
two overloaded functions rather than one function that takes both
paramaters. It also seems that if either pWndOwner or
pCommandBars are set then pWnd gets ignored.
Is what I'm trying to do possible? If so, what's the proper set of arguments to pass?
The documentation is unhelpful in this situation and none of the samples appear to try to do something like this.
|