windows - How can I use GetNextWindow() in C#? -


The Microsoft WinAPI documentation appears to suggest that user32.dll contains a function that is believed to be Someone is allowed to calculate open windows in their jade. Order this function by repeatedly calling it

Usually I give the DllImport statement to use WinAPI function from C #. However, its entry is not available for GetNextWindow () , so I tried to create my own:

  [DllImport ("user32.dll")] Fixed Extern IntPtr GetNextWindow (IntPtr hWnd, uint wCmd); Unfortunately, when trying to call it, I get a  EntryPointNotFoundException : 

  called Unable to find an entry point, the 'GetNextWindow' in DLL 'user32.dll'  

This only applies to GetNextWindow () ; The other functions listed in Pinwok are fine, I can call without getting the exception GetTopWindow () and GetWindowText () .

Of course, if you can suggest a completely different way to calculate windows, in my current Z order, I am also glad to hear this.

GetNextWindow () In fact, rather than the actual API method, There is a macro for GetWindow () . This is for backward compatibility with Win16 API

  [DllImport ( "user32.dll", SetLastError = true)] static exile IntPtr GetWindow (IntPtr hWnd, uint uCmd). enum GetWindow_Cmd: uint {GW_HWNDFIRST = 0, GW_HWNDLAST = 1, GW_HWNDNEXT = 2, GW_HWNDPREV = 3, GW_OWNER = 4, GW_CHILD = 5, GW_ENABLEDPOPUP = 6}  

(a)


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -