Tag Archives: Win32

Create HBITMAP from Fl_RGB_Image

      Comments Off on Create HBITMAP from Fl_RGB_Image

Here is a simple code for convert Fl_RGB_Image to HBITMAP. HBITMAP GetHBMPfromFlRGBImg( const Fl_RGB_Image* src ) { if ( src == NULL ) return NULL; if ( src->d() != 4 ) /// Accepts only for RGBA 4 depth. return NULL; BITMAPINFOHEADER bmih = {0}; bmih.biSize = sizeof(BITMAPINFOHEADER); bmih.biWidth = src->w();… Read more »

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. Just inspected real HWND(handle of window) value with Process Hacker. It was… Read more »