tags:

views:

122

answers:

2

Is it possible to do

if(HWND1 == HWND2)

or is there a function that I need to use to see if two hwnd point to the same window?

+6  A: 

A HWND is just a long value, so yes you can compare them that way.

DannySmurf
+2  A: 

Depends how stale your data is. Windows re-uses hwnds (eventually), so there's no guarantee that 1005A is both a valid window and the window you expected, it might be another window that re-used 1005A.

Bob Moore