hWnd is a handle for a window. hKey is what you want.