Go4Expert

Go4Expert (http://www.go4expert.com/)
-   MFC (http://www.go4expert.com/forums/mfc/)
-   -   Static Event Problem on MFC Dialog (http://www.go4expert.com/forums/static-event-mfc-dialog-t19141/)

alis 24Aug2009 10:32

Static Event Problem on MFC Dialog
 
Hi all,
I have a mfc dialog and on it I have one static that is my opengl class, and a tab control. I have some problem:
1- My static doesn't receive key and mouse event, this event sent to dialogs of tab control, How can I receive key and mouse event in static object?

2- I use F5 key for hide and show of tab control. I resize static with SetWindowPos() function on tab control hide and show. At first I have my opengl sence on static but when I resize static I have only a blank black screen. Why?

3- I want to use F1 for another event other than Help. How can I disable help when press F1?

Thanks.

shabbir 24Aug2009 13:01

Re: MFC Dialog Problem
 
Quote:

Originally Posted by alis (Post 55878)
1- My static doesn't receive key and mouse event, this event sent to dialogs of tab control, How can I receive key and mouse event in static object?

What is the name of your static control. If its IDC_STATIC try changing it.

Quote:

Originally Posted by alis (Post 55878)
2- I use F5 key for hide and show of tab control. I resize static with SetWindowPos() function on tab control hide and show. At first I have my opengl sence on static but when I resize static I have only a blank black screen. Why?

May be Paint issues

Quote:

Originally Posted by alis (Post 55878)
3- I want to use F1 for another event other than Help. How can I disable help when press F1?

Catch the Keyboard event and stop passing it to the parent.

alis 1Sep2009 13:43

Re: Static Event Problem on MFC Dialog
 
Hi shabbir
I catch the F1 keyboard event and call my function related to F1 and then set message equal NULL, but the problem exist. Can you help me more?
Thanks

shabbir 1Sep2009 14:11

Re: Static Event Problem on MFC Dialog
 
Why do you need to set the message to NULL. Just do not pass on to parent.

How are you catching F1 Event. It should be done in WndProc preferably

alis 2Sep2009 15:31

Re: Static Event Problem on MFC Dialog
 
I catch F1 and other key in dialog preTranslateMessage event.


All times are GMT +5.5. The time now is 17:04.