Problem with the ALT key on windows nt4



Hi,

I've implemented the program below on windows NT 4.
This program work's on linux but on windows NT 4 I
have a problem with ALT key. 
When I press this key on the keyboard the program
don't receive the key value.> I need to receive this
key value.
Can you help me ,please. Thank's 
 Irfan DELBASSEZ      
For this I use GTK 1.3.
#include <gtk/gtk.h
#include <stdio.h>
 GtkWidget *darea; gboolean on_darea_event (GtkWidget
*widget, GdkEvent
 *event, gpointer user_data);

 int main( int   argc,
           char *argv[] ) {GtkWidget *window;  
GtkStyle *style;
   GtkWidget *event_box, *boxv, *boxh;   int
initImgEncoding=0; 
   gtk_init (&argc, &argv);   
   window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
   gtk_window_set_title (GTK_WINDOW (window), "test
des touches");
   darea = gtk_drawing_area_new();
   gtk_drawing_area_size(GTK_DRAWING_AREA (darea),
800, 600);  
   gtk_widget_set_events (window, GDK_KEY_PRESS_MASK 
GDK_KEY_RELEASE_MASK);
      gtk_signal_connect (GTK_OBJECT (window),
 "key_press_event", GTK_SIGNAL_FUNC (on_darea_event),
NULL);    
   gtk_signal_connect (GTK_OBJECT (window),
 "key_release_event", GTK_SIGNAL_FUNC
(on_darea_event), NULL);   
   gtk_widget_show_all(window);
gtk_main();
return 0; 
} 

gboolean on_darea_event (GtkWidget *widget, GdkEvent
 *event, gpointer user_data) {  	printf("key
pressed\n");
 	 printf("key:%x\n",((GdkEventKey *)event)-keyval); }

___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com



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