OnKeyDown event not working ?
-
Hi I have developed a custom banner using CBannerStatic class and source file give at "http://www.codeproject.com/staticctrl/bannerstatic2.asp" Now the problem is it terminates when I press ESC or spacebar. I want to use a different key combination to terminate, like say Ctrl+Alt+A or simply say "Ctrl + Q". For that I used OnKeyDown() and put the WM_KEYDWON event in message map but it's not working. I have also used OnChar() and same way WM_CHAR but still it's not working.... Any idea or any help how to overcome this ? Regards, Amarelia Maehsh Gujarat India
-
Hi I have developed a custom banner using CBannerStatic class and source file give at "http://www.codeproject.com/staticctrl/bannerstatic2.asp" Now the problem is it terminates when I press ESC or spacebar. I want to use a different key combination to terminate, like say Ctrl+Alt+A or simply say "Ctrl + Q". For that I used OnKeyDown() and put the WM_KEYDWON event in message map but it's not working. I have also used OnChar() and same way WM_CHAR but still it's not working.... Any idea or any help how to overcome this ? Regards, Amarelia Maehsh Gujarat India
I think you are using it in your dialog box. So all keys pressed go to the parent window. In this case it is going to the Cancel or OK button, so the application exits. You need to handle your particular key combination e.g, Ctrl + Q etc for the main dialog using accelerators. this is this.
-
Hi I have developed a custom banner using CBannerStatic class and source file give at "http://www.codeproject.com/staticctrl/bannerstatic2.asp" Now the problem is it terminates when I press ESC or spacebar. I want to use a different key combination to terminate, like say Ctrl+Alt+A or simply say "Ctrl + Q". For that I used OnKeyDown() and put the WM_KEYDWON event in message map but it's not working. I have also used OnChar() and same way WM_CHAR but still it's not working.... Any idea or any help how to overcome this ? Regards, Amarelia Maehsh Gujarat India
-
I don't mind if you want to see my code.....but where and how to send my code....can you plz give me u'r personal mail address so that I can send it over there.... And yes I have traced it but it never goes into OnKeyDown fuction. Regards Amarelia Maehsh Gujarat India
-
I think you are using it in your dialog box. So all keys pressed go to the parent window. In this case it is going to the Cancel or OK button, so the application exits. You need to handle your particular key combination e.g, Ctrl + Q etc for the main dialog using accelerators. this is this.