Keydown from CView to CFrameWnd
-
I was wondering how I get a key pressed that isn't handled by my CView derived class to be passed down to the CFrameWnd container that it is sitting in. I have a OnkeyDown in my CView class and one in my CFrameWnd class. When I fire a keydown event by typing on the keyboard, I only get the message as far as my CView class. What do I need to do so it propagates down to the CFrameWnd class? Cheers, Clint
-
I was wondering how I get a key pressed that isn't handled by my CView derived class to be passed down to the CFrameWnd container that it is sitting in. I have a OnkeyDown in my CView class and one in my CFrameWnd class. When I fire a keydown event by typing on the keyboard, I only get the message as far as my CView class. What do I need to do so it propagates down to the CFrameWnd class? Cheers, Clint
Put this in your CView::OnKeyDown() GetParent()->PostMessage(WM_KEYDOWN,nChar,MAKELONG(nRepCnt,nFlags)); John