PreTranslateMessage and m_msgCur problem
- From: "Timo Partanen" <timo.partanen@xxxxxxxxxxxxx>
- Date: Wed, 30 Jul 2008 10:50:40 +0300
I have noticed an odd problem in our DLL module. One of my CWnd-based
classes overwrites PreTranslateMessage and checks for WM_KEYDOWN with
VK_TAB. When this message comes, the code does some processing and shows a
modal dialog box or property ***. After the user closes the popup window,
my PreTranslateMessage continues executing and it calls CWnd's
PreTranslateMessage with the supplied pMsg. The problem is that the message
passed to CWnd::PreTranslateMessage is not the same as the message that came
in indicating that the module state's m_msgCur was changed during showing
the popup window. This will cause asserts in MFC code. What am I doing wrong
or is this an expected behavior in some cases? What can I do to avoid this
problem?
Thanks in advance.
--
Timo Partanen
www.m-files.com
.
- Follow-Ups:
- Re: PreTranslateMessage and m_msgCur problem
- From: Joseph M . Newcomer
- RE: PreTranslateMessage and m_msgCur problem
- From: Victor
- Re: PreTranslateMessage and m_msgCur problem
- Prev by Date: Re: DoDataExchange, GetDlgItem and Controls
- Next by Date: Re: Scrolling large images
- Previous by thread: icon background is not transparent when aero is enabled in vista
- Next by thread: RE: PreTranslateMessage and m_msgCur problem
- Index(es):