Mapping WM_LBUTTONDOWN in a CFrameWnd derived class

This is a discussion on Mapping WM_LBUTTONDOWN in a CFrameWnd derived class within the Windows Programming forums, part of the Platform Specific Boards category; Hi all, I am using VC++ 6.0. I am creating a simple "MFC AppWizard" based SDI application....and using ClassWizard to ...

  1. #1
    Registered User Zeeshan's Avatar
    Join Date
    Oct 2001
    Location
    Munich, Germany
    Posts
    224

    Question Mapping WM_LBUTTONDOWN in a CFrameWnd derived class

    Hi all,

    I am using VC++ 6.0.

    I am creating a simple "MFC AppWizard" based SDI application....and using ClassWizard to map WM_LBUTTONDOWN in the CMainFrame class. Thus Class Wizard creates an OnLButtonDown function....

    However, this function never get called???? I placed a TRACE statement and it never gets executed. On the other hand, if I create the OnLButtonDown function in the CView derived class....it gets called without any problems.

    Thanks in advance.

  2. #2
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    Windows question. Moved.


    The CView-derived window covers the entire area of the CMainFrame window, except for the borders and stuff ("non-client" areas) which don't report LBUTTONDOWN. Therefore, CMainFrame never gets clicks.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Two conceptual questions
    By AntiScience in forum C++ Programming
    Replies: 3
    Last Post: 11-01-2007, 11:36 AM
  2. derived class can not access base class protected member?
    By George2 in forum C++ Programming
    Replies: 2
    Last Post: 10-21-2007, 06:32 PM
  3. Calling constructor of the base class of a derived class..
    By CaptainPenguin in forum C++ Programming
    Replies: 5
    Last Post: 02-19-2003, 12:47 PM
  4. Replies: 4
    Last Post: 12-28-2002, 11:29 PM
  5. Troubles overriding a const in a derived class
    By sh0x in forum C++ Programming
    Replies: 5
    Last Post: 10-05-2001, 07:11 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21