How I can determine when a window handle is valid?
I am writing a DLL whic开发者_如何学运维h make some operations on a particular window, but sometimes the handle passed is not valid. Does there exist any function to validate that the handle passed is valid (belongs to a window)?
Try using the IsWindow
function, which is declared in the Windows unit.
function IsWindow(hWnd: HWND): BOOL; stdcall;
精彩评论