I have the following problem. I want to create an XLL (using the C
API) which adds a menu to Excel 2007. The menu must have a few
entries, say "Help" and "About". I managed to do it with xlfRegister
and I could also set up the C functions called when either "Help" or
"About" is selected.
However, I would like to have "Help" and "About" calling the same C
function and, inside this function, detect which entry (either "Help"
or "About") generated the call. Is that possible? May be using some
Windows API call?
I know the example above sounds silly. Actually it's just a
simplification (for the sake of brevity) of what I really need. If I
can solve the problem above, I guess, I can also solve the real one.
Any help is appreciated.
Regards,
Cassio.
Just after posting the message above I found the solution. To leave a
record here (in case it's useful for somebody else) the function
xlfCaller (which has no input parameters) returns an 1x4 array where
the first entry is the sequencial number of the caller inside the
menu.
Thanks anyway.
Cassio.