Capturing Win32 WM_* messages in gtkmm application

View: New views
2 Messages — Rating Filter:   Alert me  

Capturing Win32 WM_* messages in gtkmm application

by Mohith :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

I have a gtkmm application running on window. Now there is this Win32 message (WM_DEVICECHANGE) that would help me detect device connect / disconnect event. I used to do it while I was using MSVC++. Nowadays after coming to gtkmm teritory I haven't seen much of Win32 messages.

How do I capture these win32 messages?

_______________________________________________
gtkmm-list mailing list
gtkmm-list@...
http://mail.gnome.org/mailman/listinfo/gtkmm-list

Re: Capturing Win32 WM_* messages in gtkmm application

by Armin Burgmeier :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Mohith Manoj wrote:
> Hello,
>
> I have a gtkmm application running on window. Now there is this Win32
> message (WM_DEVICECHANGE) that would help me detect device connect /
> disconnect event. I used to do it while I was using MSVC++. Nowadays
> after coming to gtkmm teritory I haven't seen much of Win32 messages.
>
> How do I capture these win32 messages?

Using Gdk::Window::add_filter [1]. Gobby used to use it to wait for
network events with WSAAsyncSelect, this might be helpful as an example [2].

Also note that a Gtk::Window's Gdk::Window does only exist after
realization of the widget, use signal_realize() to wait for that to
happen instead of accessing it directly after construction.

Armin

  [1]
http://library.gnome.org/devel/gtkmm/stable/classGdk_1_1Window.html#a413863a30bbac24d6d1a207401c07caf
  [2]
http://git.0x539.de/?p=gobby.git;a=blob;f=src/io/main_connection_win32.cpp;h=b239d30c165782662050cae98614e9b24b078e71;hb=6d5da5685c3c272f4bb3cb064d61719b55b84fa1
_______________________________________________
gtkmm-list mailing list
gtkmm-list@...
http://mail.gnome.org/mailman/listinfo/gtkmm-list