CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2005
    Posts
    52

    Problem while overriding CChildFrame::PreTranslateMessage

    In a simple MDI application, I tired to override CChildFrame::PreTranslateMessage to pre-process some events or just drop them if meet some condition. However, I found that all events were received twice out there, I don't why MDI framework dispatched same event twice to CChildFrame::PreTranslateMessage, but that was really unexpected, and how to avoid that?

    Thanks.
    Last edited by LifeIsSuffering; November 23rd, 2010 at 03:27 AM.

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,430

    Re: Problem while overriding CChildFrame::PreTranslateMessage

    1. Do you mean Events or Messages?
    2. What kinds of Events / Messages are you going to handle in CChildFrame::PreTranslateMessage and why in CChildFrame class and why in PreTranslateMessage?
    3. Did you consider to implement message handlers instead?
    Victor Nijegorodov

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured