Chris Ness wrote: > I had decided not to use the command ID technique until I got things > working, so TPM_RETURNCMD was commented out when I defines flags. From > my understanding of MSDN and pywin32, this should make commands > immediately execute and cause TrackPopupMenu to return an HRESULT?
Hmm, I should have read the doc more closely before I replied. My fault. I doesn't work quite that automatically. TrackPopupMenu is a general-purpose Windows API -- it doesn't have any connection to or knowledge of Windows Explorer, so it cannot force Explorer to take actions. If you don't specify TPM_RETURNCMD, then the final result of selecting a menu item will be that a WM_COMMAND message sent to your window. Your window doesn't know what to do with those command codes, so nothing useful will happen. In this particular case, I think you HAVE to use TPM_RETURNCMD. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. _______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32