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
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. error C2065: 'GET_X_LPARAM' : undeclared identifier

error C2065: 'GET_X_LPARAM' : undeclared identifier

Scheduled Pinned Locked Moved C / C++ / MFC
comhelpquestion
6 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.
  • U Offline
    U Offline
    untwisted
    wrote on last edited by
    #1

    Arghhhhh! Shouldn't this work???? ------------------------------------ POINT pt; case WM_MOUSEMOVE: pt.x = GET_X_LPARAM(lParam); pt.y = GET_Y_LPARAM(lParam); ------------------------------------ I keep getting the error in the subject! I don't know what's wrong! -untwisted www.uber-ware.com brian@uber-ware.com

    K P 2 Replies Last reply
    0
    • U untwisted

      Arghhhhh! Shouldn't this work???? ------------------------------------ POINT pt; case WM_MOUSEMOVE: pt.x = GET_X_LPARAM(lParam); pt.y = GET_Y_LPARAM(lParam); ------------------------------------ I keep getting the error in the subject! I don't know what's wrong! -untwisted www.uber-ware.com brian@uber-ware.com

      K Offline
      K Offline
      kochhar
      wrote on last edited by
      #2

      Did you remember to include: #define GET_X_LPARAM(lp) ((int)(short)LOWORD(lp)) #define GET_Y_LPARAM(lp) ((int)(short)HIWORD(lp)) in your file?

      U 1 Reply Last reply
      0
      • K kochhar

        Did you remember to include: #define GET_X_LPARAM(lp) ((int)(short)LOWORD(lp)) #define GET_Y_LPARAM(lp) ((int)(short)HIWORD(lp)) in your file?

        U Offline
        U Offline
        untwisted
        wrote on last edited by
        #3

        Isn't that already defined for me though? Edit: I definded it, and now it's working! Thanks! -untwisted www.uber-ware.com brian@uber-ware.com

        1 Reply Last reply
        0
        • U untwisted

          Arghhhhh! Shouldn't this work???? ------------------------------------ POINT pt; case WM_MOUSEMOVE: pt.x = GET_X_LPARAM(lParam); pt.y = GET_Y_LPARAM(lParam); ------------------------------------ I keep getting the error in the subject! I don't know what's wrong! -untwisted www.uber-ware.com brian@uber-ware.com

          P Offline
          P Offline
          peterchen
          wrote on last edited by
          #4

          #include <windowsx.h> usually does the trick, but I got used to

          #ifndef GET_X_LPARAM
          #define GET_X_LPARAM(lParam) ((int)(short)LOWORD(lParam))
          #endif
          #ifndef GET_Y_LPARAM
          #define GET_Y_LPARAM(lParam) ((int)(short)HIWORD(lParam))
          #endif

          (WTL does the same, btw.)


          "Der Geist des Kriegers ist erwacht / Ich hab die Macht" StS
          sighist | Agile Programming | doxygen

          R 1 Reply Last reply
          0
          • P peterchen

            #include <windowsx.h> usually does the trick, but I got used to

            #ifndef GET_X_LPARAM
            #define GET_X_LPARAM(lParam) ((int)(short)LOWORD(lParam))
            #endif
            #ifndef GET_Y_LPARAM
            #define GET_Y_LPARAM(lParam) ((int)(short)HIWORD(lParam))
            #endif

            (WTL does the same, btw.)


            "Der Geist des Kriegers ist erwacht / Ich hab die Macht" StS
            sighist | Agile Programming | doxygen

            R Offline
            R Offline
            Rage
            wrote on last edited by
            #5

            peterchen wrote: #include usually does the trick, but I got used to He meant #include <window.h>. Hey Peterchen, after all this time, I cannot believe you've fallen in the so-known < > trap ;P ~RaGE();

            P 1 Reply Last reply
            0
            • R Rage

              peterchen wrote: #include usually does the trick, but I got used to He meant #include <window.h>. Hey Peterchen, after all this time, I cannot believe you've fallen in the so-known < > trap ;P ~RaGE();

              P Offline
              P Offline
              peterchen
              wrote on last edited by
              #6

              Aaaargh! Und du mußt natürlich noch in der Wunde rumstochern! :suss:


              "Der Geist des Kriegers ist erwacht / Ich hab die Macht" StS
              sighist | Agile Programming | doxygen

              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