Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - VK_DELETE not received in OnKeyDown!
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

VK_DELETE not received in OnKeyDown!

 Post Reply Post Reply
Author
Message
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Topic: VK_DELETE not received in OnKeyDown!
    Posted: 04 April 2009 at 6:26am

XTP 13.0.0.

Just discovered that my VK_DELETE-handler is never reached. Then I found this code:
 
BOOL CXTPReportControl::PreTranslateMessage(MSG* pMsg)
{
    if (pMsg->message == WM_KEYDOWN)
    {
        if (!OnPreviewKeyDown((UINT&)pMsg->wParam, LOWORD(pMsg->lParam), HIWORD(pMsg->lParam)) )
        {
            TRACE(_T("ReportControl, PreTranslateMessagem-OnPreviewKeyDown('%d') = CANCEL  \n"), pMsg->wParam);
            return TRUE;
        }
    }
    return CWnd::PreTranslateMessage(pMsg);
}
 
And this:
 
void CXTPReportControl::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
{
//  TRACE(_T("ReportControl, OnKeyDown('%d') \n"), nChar);
// Moved to PreTranslateMessage
//  if (!OnPreviewKeyDown(nChar, nRepCnt, nFlags))
//  {
//      return;
//  }
 
Did you change the behavior or is this a bug?
PokerMemento - http://www.pokermemento.com/
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Posted: 07 April 2009 at 7:24am
No news? This is quite critical if you ask me...
PokerMemento - http://www.pokermemento.com/
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 08 April 2009 at 4:26pm
It was historical change - I don't know when - years ago? You can catch this in your app (or make accelerator) and react like GetReportControl()->Cut()
so this is not critical as easy to implement on your side
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Posted: 09 April 2009 at 6:10am
Hmm. If I can catch all other keys, i'd expect to be able to catch VK_DELETE too.
PokerMemento - http://www.pokermemento.com/
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.188 seconds.