|
Dear Friends,
How to know whether the mouse button is Down
even if it moving.The WM_LBUTTONDOWN message is fired
only for the first time left button is pressed.
But how to know whether it is pressed all the time
though it may be moving.
|
|
|
|
|
|
Calling GetKeyState may be a better choice as it reflects state of the button when the current message was generated.
Steve
|
|
|
|
|
I'm sure that's what I meant
Thanks Steve!
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
poda wrote: How to know whether the mouse button is Down
even if it moving.
Add event handler for WM_MOUSEMOVE . If the WPARAM for this event has MK_LBUTTON set then left mouse button is down, or if it has MK_MBUTTON , MK_RBUTTON then the corresponding mouse button is down!
If you are using MFC then use void OnMouseMove( UINT nFlags, CPoint point ).
nFlags will contain appropriate flags to indicate whether left, middle, right buttons or whether shift key is down. Use bitwise and to find out.
E.g.
if(( nFlag & MK_LBUTTON ) == MK_LBUTTON )
AfxTrace( "You are dragging the mouse\n" );
Nibu thomas
Microsoft MVP for VC++
Code must be written to be read, not by the compiler, but by another human being.
Programming Blog: http://nibuthomas.wordpress.com
modified on Friday, April 11, 2008 2:58 AM
|
|
|
|
|
Thanks for your replies friends.
I used like
<br />
SHORT LButtonDown;<br />
LButtonDown=GetKeyState(VK_LBUTTON);<br />
<br />
if(LButtonDown & 0x8000)<br />
{<br />
...code here<br />
}<br />
It works.Thanks a lot.
|
|
|
|
|
Im not sure see here[^] and here[^] does any help?
|
|
|
|
|
Hi,
I am copying data from a char array to a TCHAR array. In this case first byte of the TCHAR array element is same as char array byte ,but the second byte of the tchar array is FF sometimes instead of 00 for japanese character set.
because of this I am not able to display japanese characters in web page when my system locale is enlish(us)
Surendra Vishwkarma
|
|
|
|
|
1. Please ensure whether you have installed language packs.
2. Make us to understand your situation by providing some code snippets.
Thanks a lot
|
|
|
|
|
Did you want to make multilanguage program?
|
|
|
|
|
hello,,
Can Any one tell me ,howcan i load bitmap( from CFileDialog) in Runtime.
Thanku.
|
|
|
|
|
|
Thanks!!!!! i got the solution
|
|
|
|
|
Or you can use of CImage class for it and other formats.
|
|
|
|
|
Hello All
I want to develop addon for Mozila Firefox browser.
Is there any body who can give me idea to do so?
Thanks in advance
Manish Patel.
B.E. - Information Technology.
|
|
|
|
|
|
Refer this article[^]
Use the sample for a better understanding
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Did you search on the Net?
|
|
|
|
|
Hi all,
I want to make a application in which when i click on my exe some files get copied to a specified path and after coping those file one of those files get executed. But i don't want any dialog box to be displayed or anything else to be displayed....
How an i do this???
Thanks in advance
|
|
|
|
|
|
Create a hidden window.
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
You can pass the names of the files and the path [where you want to copy the files to] as arguments to your application and then use ShellExecute to execute the file you want to. See for how you can use command line arguments.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Just make a straight Win32 application and don't show a dialog or window.
Steve
|
|
|
|
|
neha.agarwal27 wrote: But i don't want any dialog box to be displayed or anything else to be displayed....
Copying files does not cause any UI components to be displayed.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
You can use of a batch for run that exe file and also you can make a hidden dialog with ShowWindow(SW_HIDE).
|
|
|
|