Mouse button state
-
-
In OnMouseLeave method which is invoked when the WM_MOUSELEAVE message arrives I would like to determine the mouse button states too. Any idea how to do this? Do we have something like GetAsyncKeyState method which is for keyboard state? Thanks, Abyss
Abyss wrote:
In OnMouseLeave method
Wrong forum?
Abyss wrote:
WM_MOUSELEAVE
? :confused:
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
[my articles] -
Abyss wrote:
In OnMouseLeave method
Wrong forum?
Abyss wrote:
WM_MOUSELEAVE
? :confused:
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
[my articles] -
I'm not sure why do you think this is in wrong forum. :confused: It is a windows message (WINAPI) and used in C++ code. My application uses MFC to route this message. Which forum do you recommend for this question?
Sure? I cannot find any reference to
WM_MOUSELEAVE
on MSDN andOnMouseLeave
is typically a method of.NET Framework
controls. :)If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
[my articles]modified on Tuesday, January 01, 2008 11:13:41 AM
-
Sure? I cannot find any reference to
WM_MOUSELEAVE
on MSDN andOnMouseLeave
is typically a method of.NET Framework
controls. :)If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
[my articles]modified on Tuesday, January 01, 2008 11:13:41 AM
-
Absolutely - take a look at http://msdn2.microsoft.com/en-us/library/ms645615.aspx[^]
OK, you're right, my bad :-O . Anyway have a look to
GetAsyncKeyState
documentation itself http://msdn2.microsoft.com/en-us/library/ms646293(VS.85).aspx[^] the following sentence looks promising: Remarks The GetAsyncKeyState function works with mouse buttons. However, it checks on the state of the physical mouse buttons, not on the logical mouse buttons that the physical buttons are mapped to. For example, ... :)If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
[my articles] -
OK, you're right, my bad :-O . Anyway have a look to
GetAsyncKeyState
documentation itself http://msdn2.microsoft.com/en-us/library/ms646293(VS.85).aspx[^] the following sentence looks promising: Remarks The GetAsyncKeyState function works with mouse buttons. However, it checks on the state of the physical mouse buttons, not on the logical mouse buttons that the physical buttons are mapped to. For example, ... :)If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
[my articles] -
Wow :omg: I was blind !!! I did not expect that GetAsyncKeyState can handle mouse buttons as well. I just tried and it really works and solved my problem. Many thanks. Abyss
Abyss wrote:
I did not expect that GetAsyncKeyState can handle mouse buttons as well.
I didn't expect too. I accidentally saw that remark: sometimes luck helps... :laugh: :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
[my articles]