Print Page | Close Window

VK_DELETE not received in OnKeyDown!

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=13919
Printed Date: 16 May 2024 at 1:13pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: VK_DELETE not received in OnKeyDown!
Posted By: znakeeye
Subject: VK_DELETE not received in OnKeyDown!
Date 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/



Replies:
Posted By: znakeeye
Date Posted: 07 April 2009 at 7:24am
No news? This is quite critical if you ask me...

-------------
PokerMemento - http://www.pokermemento.com/


Posted By: mdoubson
Date 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


-------------
Mark Doubson, Ph.D.


Posted By: znakeeye
Date 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/



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net