How to get the focus from a folder or an item?

  • Thread starter Thread starter Peter Marchert
  • Start date Start date
P

Peter Marchert

Hello,

I`m searching for a method to get the focus of the actual selection.
How can I check if the folder (in the navigationpane) has the focus and
not one or more items? I want to different per code (VBA/API) if the
focus is set to a folder (so the code should work with all items in the
folder) or to 1 or more items.
 
Ok, not longer important for me - I show a dialog to select, what the
user want to do.

Thanks
Peter
 
Am 22 Oct 2006 04:22:45 -0700 schrieb Peter Marchert:

Peter, you would have to use some Win32 APis. First you must get the handle
for the windows (NetUIHWND class for the navi pane, SUPERGRID class for the
explorer). Then you call the API GetFocus to get the handle of the window
with the focus and compare that value with the other ones.
 
Hi Michael,

thanks for your answer. Perhaps I need this in a future funciton.

Peter
Am 22 Oct 2006 04:22:45 -0700 schrieb Peter Marchert:

Peter, you would have to use some Win32 APis. First you must get the handle
for the windows (NetUIHWND class for the navi pane, SUPERGRID class for the
explorer). Then you call the API GetFocus to get the handle of the window
with the focus and compare that value with the other ones.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.VBOffice.net --
Hello,

I`m searching for a method to get the focus of the actual selection.
How can I check if the folder (in the navigationpane) has the focus and
not one or more items? I want to different per code (VBA/API) if the
focus is set to a folder (so the code should work with all items in the
folder) or to 1 or more items.

--
Peter Marchert
[EDV-Service Marchert]
Homepage: http://www.marchert.de
Excel- und Outlookprogrammierung
 
Back
Top