From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
06-08-2017 01:07 PM
Hello Community,
I am currently designing a Labview VI using the Windows API functions through the "call library function node" block to first, retrieves the handle of all windows, then check through each window what it's most recent pop up handle was and then pass that handle to the get windows text API to display an array with the list of most recent pop up titles. I am trying to then compile this into an .exe file and run another VI that uses the three button dialog block to create a pop up that I can close, but I can't find the pop up anywhere on the list. The list of names that I get is about 500 long each time and I don't really understand why it's that long. I am very new to labview and working with the Windows API functions so any help with this would be great. I have attached a screeny of the block diagram along with the front panel showing what I get at the output. Just to be clear my questions are.
1. Is my block diagram wired to correctly do what I want?
2. Why is the list of names so long at the output?
Thx,
Sam
06-08-2017 01:40 PM
Post your VI (not an image).
06-08-2017 01:48 PM
woops, im such a newbie.
06-08-2017 02:16 PM
According to the Microsoft API:
The return value identifies the most recently active pop-up window. The return value is the same as the hWnd parameter, if any of the following conditions are met:
As such, you're getting a lot of things that aren't actually pop-ups. I would recommend checking to see if the return value is the same as the input value, and if so discarding the reference.
06-08-2017 05:55 PM
I made a case structure in accordance with your recommendation and now I am getting an array list that doesn't have anything in it.