Mark Balla Posted April 12, 2006 Report Share Posted April 12, 2006 I am upgrading my program helper tool and would like it to be able to detect what the name of the active widow is. I initially tried the Active VI property node but it will only update the output string if something is selected which isn't always the case. I've also tried the Open G Find VI with Focus.vi but it will only update the name string if the Front Panel is selected and not the Block Diagram. Is there a windows API dll call or another VI that can tell me the name of the active window? Quote Link to comment
Mike Ashe Posted April 13, 2006 Report Share Posted April 13, 2006 If you search on DevZone for the LabVIEW Utils package (lvwutil32.zip) I think there is a VI that does this and the DLL call is defined inside. If you can't find it, PM me and I'll send you a copy. Quote Link to comment
Mark Balla Posted April 13, 2006 Author Report Share Posted April 13, 2006 If you search on DevZone for the LabVIEW Utils package (lvwutil32.zip) I think there is a VI that does this and the DLL call is defined inside. I downloaded these vis as you sugessted. The best I could do was to get a list of the application windows open. I could not get them to give me names of any of the Labview windows open. After googleing around a while there seems to be a function in windows user32.dll called GetActiveWindow but I can't find the prototype for it. Does anyone have any experience using the user32.dl or know where I can get the function prototypes for it. Thanks Quote Link to comment
djolivet Posted April 13, 2006 Report Share Posted April 13, 2006 Here you go, I just cut and pasted from somewhere, so some clean up maybe required. Hope this helps Denis Download File:post-1881-1144938178.vi Quote Link to comment
Mark Balla Posted April 13, 2006 Author Report Share Posted April 13, 2006 Here you go, I just cut and pasted from somewhere, so some clean up maybe required.Hope this helps Denis That is exactly what I was looking for Thanks. :thumbup: I would still like to know how to get the windows dll prototypes. If anyone can point me in that direction. Quote Link to comment
djolivet Posted April 13, 2006 Report Share Posted April 13, 2006 www.msdn.com I find it very difficult to find stuff here, but if you put enough time into it you will find what you need. In the past I have installed the MS SDK documentation from the LabWindows/CVI installation. This tool is much easier to use. Good luck Denis Quote Link to comment
crelf Posted April 13, 2006 Report Share Posted April 13, 2006 The Microsoft Developer Network is your best bet - just about all of the MS dll's are documented there. Be carfeul though: make sure the page you're looking at is appropriate for the OS you'll be working on (they often have diferent pages for the same named dll, but Win 95, 98, 2000...) Quote Link to comment
Rolf Kalbermatter Posted April 13, 2006 Report Share Posted April 13, 2006 www.msdn.comI find it very difficult to find stuff here, but if you put enough time into it you will find what you need. If you know the function name such as in this case it is very simple. OTherwise it is indeed hard to find something because of the sheer amount of information on that site. I little to borad of a term and you end up with thousends of links and usually some rather obscure ones (at least for people mainly interested in Win32 API) on the top. For browsing more lasurely in the Win32 API an installation of the Microsoft SDK is quite handy. It is not talking about every possible MS soft but concentrates on the Windows API and family. Rolf Kalbermatter The Microsoft Developer Network is your best bet - just about all of the MS dll's are documented there. Be carfeul though: make sure the page you're looking at is appropriate for the OS you'll be working on (they often have diferent pages for the same named dll, but Win 95, 98, 2000...) Actually Win95,98,2000 are usually on the same page if it is about Win32 API, or lets better say it sometimes still states that certain functions are available in older Windows versions. Microsoft is slowly getting mentioning of old and unsupported OS versions out of the docs when revisiting such said docs. What I usually end up finding when looking for a particular API are the function descriptions of the Windows CE APIs in tenfold on the top of the found links before I sometimes get the link to the REAL API. Rolf Kalbermatter Quote Link to comment
klessm1 Posted April 14, 2006 Report Share Posted April 14, 2006 I use the APIViewer to get all of prototypes I use for windows functions. I agree that it is not too much fun trying to find the function you need on msdn. I had at one time found a page on msdn that listed all of the functions plus you could search them by functional group which helped. Unfortunatly I cannot find that page, nor do I have the bookmark. I might have deleted it becuase they got rid of it and restructured. I also used allapi.net when I first started searching for windows functions. It is ok, but they stopped supporting the site in 2002. Quote Link to comment
Rolf Kalbermatter Posted April 14, 2006 Report Share Posted April 14, 2006 I use the APIViewer to get all of prototypes I use for windows functions. I agree that it is not too much fun trying to find the function you need on msdn. I had at one time found a page on msdn that listed all of the functions plus you could search them by functional group which helped. Unfortunatly I cannot find that page, nor do I have the bookmark. I might have deleted it becuase they got rid of it and restructured. I also used allapi.net when I first started searching for windows functions. It is ok, but they stopped supporting the site in 2002. Having done some work in Wine and knowing the structure of the Wine code a bit I have to say that having a full source installation of said has helped me quite a bit. Not necessarily easy to find a particular function if you do not know where to look for but about how to achieve a lot of things. Wine code is usually good structured and rather high quality so learning from there is definitely not a bad thing. Rolf Kalbermatter Quote Link to comment
djolivet Posted April 14, 2006 Report Share Posted April 14, 2006 Here is the download for the latest SDK for windows XP http://www.microsoft.com/downloads/details...&DisplayLang=en Denis Quote Link to comment
JDave Posted May 21, 2006 Report Share Posted May 21, 2006 Here you go, I just cut and pasted from somewhere, so some clean up maybe required.Hope this helps Denis I tried this out on my system (Windows XP, LV 7.1.1) and it will return the correct windows text length for LV windows, but the last dll call will not return the actual string. It works fine on other app. windows. Any ideas? David Quote Link to comment
Rolf Kalbermatter Posted May 21, 2006 Report Share Posted May 21, 2006 That is exactly what I was looking forThanks. :thumbup: I would still like to know how to get the windows dll prototypes. Go to msdn.microsoft.com and search for the function you want to know about. Rolf Kalbermatter Quote Link to comment
djolivet Posted July 4, 2006 Report Share Posted July 4, 2006 I tried this out on my system (Windows XP, LV 7.1.1) and it will return the correct windows text length for LV windows, but the last dll call will not return the actual string. It works fine on other app. windows. Any ideas?David Not sure why you are having problems, works fine on my PC. WinXP LV8.0.1 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.