Results 1 to 10 of 555

Thread: Tests Copying, Pasting, API Cliipboard issues. and Rough notes on Advanced API stuff

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,468
    Rep Power
    10
    Forum Post #post24931 Thread Post 2824
    https://www.excelfox.com/forum/showthread.php/2824-Tests-Copying-pasting-Cliipboard-issues-and-otes-on-API-stuff?p=24931&viewfull=1#post24931
    https://www.excelfox.com/forum/showt...ll=1#post24931
    https://www.excelfox.com/forum/showthread.php/2824-Tests-Copying-pasting-Cliipboard-issues-and-otes-on-API-stuff/page56#post24931
    https://www.excelfox.com/forum/showt...ge56#post24931







    December, 2024, two months later
    On and off I have been looking a bit more at all this VBA windows API stuff, and got a few insights, comments etc., in a few places such as here
    2024:
    http://www.eileenslounge.com/viewtop...321821#p321821
    http://www.eileenslounge.com/viewtop...321838#p321838 It works by ensuring that the 'Clear All' button is displayed on the screen, then searching through the windows hierarchy find the window that represents the panel that contains the button, then obtains the Accessibilty COM interface for that button (by looking for what control with an Accessibility interface is at a specific point, first ensuring that nothing unexpected is covering that point), and then uses that Accessibility interface to invoke the (default) action the button(hopefully the 'Clear All' button).

    It's just a different route to the same thing - the 'small' code walks through the relevant part of the application's accessibility hierarchy instead of having to search for relevant windows, and ends up at the same point - an Accessibility COM interface to the 'Clear All' button (well, depending on the version of Office ...)
    http://www.eileenslounge.com/viewtop...321985#p321985
    http://www.eileenslounge.com/viewtop...322029#p322029
    http://www.eileenslounge.com/viewtop...322075#p322075 …. window from a programmers perspective: …. Parent-Child Relationships: Windows can have hierarchical relationships. A parent window can host multiple child windows, organizing the interface within a main container. This setup is commonly seen in forms containing controls such as buttons, text boxes, or custom graphics elements. ……the Windows API provides us with tools (Win32 API functions such as FindWindow and FindWindowEx)) that let us walk that hierarchy, but they do NOT give us tools to jump direct to any window we want.

    But here’s the thing – not every window we see is necessarily a Windows window (by which I mean one that is managed by the OS), and that means the standard functions cannot walk the tree.

    This is the root cause of the difference in methodology between ‘big’ and ‘small’ code examples you've been looking at

    One is trying to walk the classic hierarchy – and runs into trouble when it hits NetUIHWND, because that is the bottom of the barrel, there are no children. (Which is why Spy+ and all the Spy+ workalikes such as WinSpy fail here – there’s no more hierarchy for them to walk and display)

    The other recognises this problem, and works on the fact that the Ribbon interface maintains its own hierarchy, and that hierarchy is sort of exposed by the Accessibility interface (iAccessible). So, instead of walking down the classic windows tree, we walk down the hierarchy presented to the iAccessible interface. It has the same limitations - there is no way to jump direct to a specific element in the hierarchy; you have to use the functions provided by the oleacc dll. (Accessibility can also be used to walk the classical windows hierarchy)
    http://www.eileenslounge.com/viewtop...322084#p322084

    2019 ++
    http://www.eileenslounge.com/viewtop...321822#p321822

    http://www.eileenslounge.com/viewtop...322424#p322424

    Lists:
    http://www.eileenslounge.com/viewtop...322050#p322050
    http://www.eileenslounge.com/viewtop...322151#p322151

    http://www.eileenslounge.com/viewtopic.php?f=30&t=41610
    http://www.eileenslounge.com/viewtop...322238#p322238 2's flippin compliment +1 ?? https://www.excelfox.com/forum/showt...ll=1#post24921
    http://www.eileenslounge.com/viewtop...322270#p322270
    http://www.eileenslounge.com/viewtop...322357#p322357

    Spys and VBA windows aoi
    https://www.excelfox.com/forum/showt...ll=1#post24913
    https://www.excelfox.com/forum/showt...ll=1#post24908
    https://www.excelfox.com/forum/showt...ll=1#post24914
    https://www.excelfox.com/forum/showt...ll=1#post24909
    https://www.excelfox.com/forum/showt...ll=1#post24915
    https://www.excelfox.com/forum/showt...dows-API/page2
    https://www.excelfox.com/forum/showt...ll=1#post24921
    https://www.excelfox.com/forum/showt...ll=1#post24922 2’s Compliment Function Decimal To Binary conversion
    https://www.excelfox.com/forum/showt...ll=1#post24922
    https://www.excelfox.com/forum/showt...ll=1#post24923

    https://www.excelfox.com/forum/showt...ll=1#post24925
    https://www.excelfox.com/forum/showt...ll=1#post24926
    https://www.excelfox.com/forum/showt...ll=1#post24932


    https://stackoverflow.com/questions/...37208#79137208
    https://www.youtube.com/watch?v=C43b...Lza_0st4AaABAg
    https://www.youtube.com/watch?v=C43b...S24NBeR4AaABAg
    https://www.youtube.com/watch?v=C43b...2UjDK8d4AaABAg
    https://www.youtube.com/watch?v=suUq...pqtdqPx4AaABAg
    https://www.youtube.com/watch?v=suUq...OoGABZFQ8vjEvY
    https://www.youtube.com/watch?v=C43b...t_HABa3KswxL3c
    https://www.youtube.com/watch?v=C43b...t_HABa3tnAjhZU
    https://www.youtube.com/watch?v=3t8M...IOGABa4I83JelY
    https://www.youtube.com/watch?v=3t8M...IOGABa4Pr15NUt
    https://www.youtube.com/watch?v=3t8M...IOGABa6BSa173Z



    Last edited by DocAElstein; 12-03-2024 at 11:18 PM.

Similar Threads

  1. Replies: 21
    Last Post: 12-15-2024, 07:13 PM
  2. Replies: 114
    Last Post: 03-04-2024, 02:39 PM
  3. Replies: 42
    Last Post: 05-29-2023, 01:19 PM
  4. Some Date Notes and Tests
    By DocAElstein in forum Test Area
    Replies: 0
    Last Post: 11-23-2021, 10:40 PM
  5. Replies: 11
    Last Post: 10-13-2013, 10:53 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •