On 04/07/2010 11:21 AM, Todong Ma wrote:
> Hi,folks!
> 
> I'm tring to write a program to send GdkEventKey to other program on
> windows,such as notepad++.
> and following is my code:
> 
> HWND hwnd;
> 
> void key_press(GtkWidget *widget,GdkEventKey *event,gpointer data){
> 
>     g_print("%d %d %d %d %d %s
> \n",event->send_event,event->time,event->state,
>             event->keyval,event->length,event->string);
>     gdk_event_send_client_message((GdkEvent *)event,hwnd);
> 
> }

gdk_event_send_client_message() is only for sending events of type
GDK_CLIENT_EVENT, and no other.  I'm not sure you can actually send
arbitrary event types to other apps using gdk.  You may need to drop
down to the win32 APIs for that (or at least the gdk-win32 APIs).

        -brian
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to