in windows explorer of newer windows versions you may right-click a listview header and a context menu will pop up (showing available columns for example). I wonder how I can cause this menu to popup by keyboard commands. AFAIK, it is in windows GUI guidelines that all functions should be made available for mouse AND keyboard.

Posted on 2003-07-17 00:54:48 by japheth
Well I cheated. I used spy++ to get the window handle of that listview control and hard coded it... :grin:
invoke  SendMessage, 6024Ch, WM_RBUTTONUP, NULL, 0
Posted on 2003-07-17 02:38:26 by arkane
The menu is not on a key but the action it performs is ALT-V + N
Posted on 2003-07-17 03:13:14 by donkey

thanks, but I was interested to know the "standard" keyboard user interface. If there exist none, its ok and
I may implement anything (I dont want to "automate" windows explorer, its for one of my own apps). BTW, hard coding a window handle isnt a good idea, and AFAIL, the header HWND can be reached by ListView_GetHeader macro.

donkey, Alt-V + N doesnt do anything on my system.
Posted on 2003-07-17 06:40:59 by japheth
Oh, I thought you were just looking for a way to access it in an explorer window only (detail view). I guess for your own app you can pretty much do what you want. I think that a header control cannot have the Keyboard focus so it would not be able to process a keycode by itself, it would have to rely on the application and there is no direct key combination that will show that menu. I thought clicking on the header and pressing SHIFT-F10 might work but it just displays the context menu for the explorer window.
Posted on 2003-07-17 07:22:39 by donkey
Isn't there a window message to get the header handle for the listview control? Something like LVM_GETHEADER? And if there is, does it work for all Windows versions?
Posted on 2003-07-17 13:00:32 by QvasiModo