1

I'm trying to detect a mouse's XBUTTON1 and XBUTTON2 clicks using PreFilterMessage as suggested in an answer to my previous question, but am unsure about the how to read the WPARAM.

According to the WM_XBUTTONDOWN msdn page , I have to check the WPARAM's "high-order word" in order to distinguish between the two buttons. However, it seems from here that the size of WPARAM is different in x86 and x64. So how do I make sure it works on both?

Community
  • 1
  • 1
ispiro
  • 26,556
  • 38
  • 136
  • 291
  • Read this: http://stackoverflow.com/questions/202330/whats-a-nice-way-of-building-a-wparam-or-lparam-in-c-something-friendlier-th – DonBoitnott Jan 23 '14 at 17:37
  • @DonBoitnott Thanks. But that assumes that it's really a `uint`. Can it change sometimes (x86 vs x64)? – ispiro Jan 23 '14 at 17:43
  • I'm not certain, but [this](http://msdn.microsoft.com/en-us/library/windows/desktop/gg153548(v=vs.85).aspx) suggests perhaps it doesn't matter. – DonBoitnott Jan 23 '14 at 17:45
  • Hey ispiro did you find solution to this? – Noitidart Sep 05 '15 at 01:36
  • @Noitidart I'm not certain, but I think I went with trusting the msdn link [above](http://stackoverflow.com/questions/21315352/detecting-xbutton1-in-prefiltermessage?noredirect=1#comment32127942_21315352). – ispiro Sep 06 '15 at 14:20
  • Thanks @ispiro man, may you share your code if possible? – Noitidart Sep 06 '15 at 19:57
  • @Noitidart Sorry. I doubt we ended up implementing it, and even if so, I don’t have it available. But you can ask a question about it. (Perhaps http://stackoverflow.com/a/202383/939213 can help you?) – ispiro Sep 07 '15 at 18:24
  • Darn no problem, thanks man! – Noitidart Sep 07 '15 at 18:27

0 Answers0