I have a modeless dialog that allows users to find NEXT|PREV|QUIT that pops up after a find request using a find dialog. It is created using
pFindAgain=new CFindAgain(this);
Within that dialog, initially, I cast pParent to the actual parent class, and called the appropriate methods within the parent as in m_pParent->FindNext(). Unfortunately, I now would like to use this modeless dialog with multiple types of parents, so I did away with the cast (this is now a CWnd *)created unique messages such as XXX_FIND_NEXT, XXX_FIND_PREV, and XXX_FIND_QUIT, and in the dialog, when a user presses the button, send the appropriate message as in
m_pParent->SendMessage(XXX
_FIND_QUIT
);
I can confirm that "this" is the value of the CView that is the parent, and that the messages are being sent, but I can't see them in PreTranslateMessage, nor do they seem to have any effect on the parent at all.
In PreTranslateMessage, I'm using
if(pMsg->message==XXX_FIND
_NEXT||pMs
g->message
==XXX_FIND
_PREV||pMs
g->message
==XXX_FIND
_QUIT){
dummy code with a BREAKPOINT
}
The breakpoint is never reached.
It is probably something goofy, but I can't see it.
Thanks, Rick
Start Free Trial