Ask a questionAsk a question
 

QuestionWin7: Interfacing with explorer and taskbar

  • Tuesday, November 03, 2009 7:51 PM--Fragman-- Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi everyone, I'm currently looking into modifying the behavior of the explorer, taskbar and general window handling to improve functionality.
    I'm working with Autohotkey, as it provides quick access to many functions which would need much investigation otherwise.

    However, I'm having some problems on Windows 7. The explorer uses a DirectUIHWND class for the file list instead of a standard listview control, so I can't get the selected/focused files from outside. I'm currently using an approach that sends CTRL+C and then reads the clipboard, but it's more a hack than a solution.
    It would be nice to have a function that tells me if there is a file or free space at a specific location of the explorer window.

    Also, I'm looking for methods that tell me which part of the taskbar is below the mouse cursor or at a specific position (I mostly want to see if it's free space or some start/task/tray button, and maybe to which process the task buttons belong). Getting a list of windows which are grouped together would also be helpful.

    Then one more thing, is there a way to tell which windows are in a flashing/notify state? I would like to change the behaviour of a left click on the buttons, so a flashing window will be activated instead of showing the thumbnail window previews. I know that flashing windows send a specific shell message, do I need to keep track of those manually or is there a function to get a list somehow?

    I've already searched quite a bit for those, but I don't really know where to look for them either, so I'd be grateful for some pointers. The thing is, I'm using many workarounds right now which only work to some extent, and I would really like to increase the reliability of my code.

All Replies

  • Thursday, November 05, 2009 2:36 PM--Fragman-- Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I looked around some more concerning getting the clicked taskbar button, and found a script that sends a TB_HITTEST message to the taskbar. This doesn't appear to work on Win7 (it always returns 0 instead of the button index), probably because the taskbar is no ToolbarWindow32 anymore but MSTaskListWClass? I would suppose that this class doesn't support the TB_HITTEST message, but is there any other way? Google doesn't put out anything about that class, it doesn't seem to be documented.