GTK+ Windows: how to catch WM_HOTKEY



Hi,

I'm trying binding a Hotkey to my GTK application with RegisterHotkey.

I have created an hidden window (with CreateWindow) and a GIOChannel
with g_io_channel_win32_new_messages and used g_io_add_watch to watch it.

My callback function is called each time I press the hotkey but I can't get the
original WM_HOTKEY message with PeekMessage (PeekMessage function returns 0).
(I have tested with Gtk-2.8.20 and GTK-2.13)

So:
- What's wrong with my code ?
  I suppose Windows messages may be eaten by gdk between the reception and the
call of the callback function ?

- Should I use instead Win32 functions without GTK ?
  I'd like to stick to GTK if possible ...

Thanks,

Mehmet



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