VK_DELETE not received in OnKeyDown! |
Post Reply |
Author | |
znakeeye
Senior Member Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
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/
|
|
znakeeye
Senior Member Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
|
No news? This is quite critical if you ask me...
|
|
PokerMemento - http://www.pokermemento.com/
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
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
|
|
znakeeye
Senior Member Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
|
Hmm. If I can catch all other keys, i'd expect to be able to catch VK_DELETE too.
|
|
PokerMemento - http://www.pokermemento.com/
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |