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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top