Replaced WIN_GetWindowInstance by GetWindowLongA(GWL_HINSTANCE),