In case of failure to using fl_xid();

      Comments Off on In case of failure to using fl_xid();

I did try apply DirectX input to using joystick for my HID emulation, but my testing program failure in SetCooperativeLevel() API on dinput. At the result of analyse, I found FLTK API fl_xid() returns wrong HWND value from debuger.

inspection01 Just inspected real HWND(handle of window) value with Process Hacker. It was something wrong in internal value of calling fl_xid(); like below image.



To verify in presumption of fact, I did compare with my FLTK DX8 joystick example, and it has exactly right HWND value in calling fl_xid();. Difference is only multi window in one program. Is it a cause of wrong HWND?


Whatever is reason, I need change my code to getting HWND in source code.

It was just simple, and GetWinHandle() is following.

I don’t have time to know what’s wrong in fl_xid(), but it will be good solution to using DirectX devices in FLTK windows program.