Fix incorrect HINSTANCE -> int cast