win32: A better way to draw HCURSOR with Cairo?



Hi all!

 

I’d like to draw as much as I can using Cairo. However at some point I need to draw a cursor obtained from ::GetCursor() Win32 API function. Hence the question: what is the best way to draw it on Cairo context?

 

In gtk+/gdk/win32/gdkcursor-win32.c I can see a function like

 

static GdkCursor*

cursor_new_from_hcursor (HCURSOR       hcursor,

                                                GdkCursorType cursor_type)

 

but I feel like it won’t help me much. First it is not exported and second I’m not sure if Cairo can draw it.

 

Do I understand right that virtually the only way is to ::GetIconInfo() for that HCURSOR and then call ::GetDIBits() to retrieve bitmap data and then to create pixbuf from that data somehow?

 

P.S. I’m using gtkmm 3.0 and latest gtk+ (3.1.4) from GIT if it makes any difference.

 

Mikhail

 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]