Difference between GetCapture() and GetFocus()

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi All

I wonder what is the diferrence between those two API functions

[DllImport("coredll.dll")
private static extern IntPtr GetCapture()

[DllImport("coredll.dll")
private static extern IntPtr GetFocus()

Thanks for any help ;

Best regard
Chris
 
GetFocus retrieves the handle of the window (and in Win32 terms all controls
are windows) with the keyboard focus

GetCapture retrieves the handle of the window with the mouse (stylus) input

If you are trying to retrieve the handle of a .NETCF control you can use
either after calling either Focus() or Capture = True respectively.

Peter
 
Back
Top