Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. OnMouseWheel

OnMouseWheel

Scheduled Pinned Locked Moved C / C++ / MFC
c++question
8 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    henry128
    wrote on last edited by
    #1

    Maybe a stupid question but: I'm on Win2k with Visual C++ 6.0 and it seems nearly impossible to get any mousewheel code to work..... I had to specifically #define WM_MOUSEWHEEL 0x020 to avoid "undeclared identifier" messages. Sadly my OnMouseWheel method is not recognized anyway. I encountered several working MFC examples. Unfortunately I don't use MFC so my question is: Is it possible to get this working without MFC? Do I need a special include for this? thanx in advance

    PJ ArendsP J L 3 Replies Last reply
    0
    • H henry128

      Maybe a stupid question but: I'm on Win2k with Visual C++ 6.0 and it seems nearly impossible to get any mousewheel code to work..... I had to specifically #define WM_MOUSEWHEEL 0x020 to avoid "undeclared identifier" messages. Sadly my OnMouseWheel method is not recognized anyway. I encountered several working MFC examples. Unfortunately I don't use MFC so my question is: Is it possible to get this working without MFC? Do I need a special include for this? thanx in advance

      PJ ArendsP Offline
      PJ ArendsP Offline
      PJ Arends
      wrote on last edited by
      #2

      From WinUser.h

      #if (_WIN32_WINNT >= 0x0400) || (_WIN32_WINDOWS > 0x0400)
      #define WM_MOUSEWHEEL 0x020A
      #endif

      Notice the #if? Make sure _WIN32_WINNT or _WIN32_WINDOWS is defined properly.


      "You're obviously a superstar." - Christian Graus about me - 12 Feb '03 "Obviously ???  You're definitely a superstar!!!" mYkel - 21 Jun '04 Within you lies the power for good - Use it!

      Within you lies the power for good; Use it!

      H 1 Reply Last reply
      0
      • H henry128

        Maybe a stupid question but: I'm on Win2k with Visual C++ 6.0 and it seems nearly impossible to get any mousewheel code to work..... I had to specifically #define WM_MOUSEWHEEL 0x020 to avoid "undeclared identifier" messages. Sadly my OnMouseWheel method is not recognized anyway. I encountered several working MFC examples. Unfortunately I don't use MFC so my question is: Is it possible to get this working without MFC? Do I need a special include for this? thanx in advance

        J Offline
        J Offline
        Joel Lucsy
        wrote on last edited by
        #3

        http://www.codeproject.com/cpp/intellimouse_msg.asp[^] -- Joel Lucsy

        H 1 Reply Last reply
        0
        • H henry128

          Maybe a stupid question but: I'm on Win2k with Visual C++ 6.0 and it seems nearly impossible to get any mousewheel code to work..... I had to specifically #define WM_MOUSEWHEEL 0x020 to avoid "undeclared identifier" messages. Sadly my OnMouseWheel method is not recognized anyway. I encountered several working MFC examples. Unfortunately I don't use MFC so my question is: Is it possible to get this working without MFC? Do I need a special include for this? thanx in advance

          L Offline
          L Offline
          lzzqqq
          wrote on last edited by
          #4

          copy the file user.h who at the directory: ...VC98\include\ just under the VC++ install directory. Try it, good luck !:cool:

          1 Reply Last reply
          0
          • J Joel Lucsy

            http://www.codeproject.com/cpp/intellimouse_msg.asp[^] -- Joel Lucsy

            H Offline
            H Offline
            henry128
            wrote on last edited by
            #5

            Joel Lucsy: I clicked on the link but the (forum) page states that the page can't be found.....

            J 1 Reply Last reply
            0
            • PJ ArendsP PJ Arends

              From WinUser.h

              #if (_WIN32_WINNT >= 0x0400) || (_WIN32_WINDOWS > 0x0400)
              #define WM_MOUSEWHEEL 0x020A
              #endif

              Notice the #if? Make sure _WIN32_WINNT or _WIN32_WINDOWS is defined properly.


              "You're obviously a superstar." - Christian Graus about me - 12 Feb '03 "Obviously ???  You're definitely a superstar!!!" mYkel - 21 Jun '04 Within you lies the power for good - Use it!

              H Offline
              H Offline
              henry128
              wrote on last edited by
              #6

              thanks for respons. I'm beginner to Winprog and VC++ I tried including , but no improvement. Still the same undeclared WM_MOUSEWHEEL identifier.... My WM_LBUTTONDOWN is accepted though, both with and without . WM_LBUTTONDOWN must be defined elsewhere also I concluded. Next I outcommented WIN32_LEAN_AND_MEAN in Stdafx.h hoping this would make a difference. nope. Other includes (a.o.): windows.h en windowsx.h

              1 Reply Last reply
              0
              • H henry128

                Joel Lucsy: I clicked on the link but the (forum) page states that the page can't be found.....

                J Offline
                J Offline
                Joel Lucsy
                wrote on last edited by
                #7

                The button that transforms the url into a link puts a / at the end of the url which shouldn't have been there. Try this. http://www.codeproject.com/cpp/intellimouse_msg.asp[^] -- Joel Lucsy

                H 1 Reply Last reply
                0
                • J Joel Lucsy

                  The button that transforms the url into a link puts a / at the end of the url which shouldn't have been there. Try this. http://www.codeproject.com/cpp/intellimouse_msg.asp[^] -- Joel Lucsy

                  H Offline
                  H Offline
                  henry128
                  wrote on last edited by
                  #8

                  Thanks. It seems I made a mistake Moreover I assumed that VC++ would "know" what platform I'm working on: this seems to be not the case. I #defined _WIN32_WINNT as 0x0500 abd now everything is working fine..:)

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups