On Nov 30, 2007 4:01 PM, GLOGIC 20 <[EMAIL PROTECTED]> wrote:
>
> Hey Brett
> That was a quick response.
> what im using for keyboard is eg.
> if((keys['R'] & 128) != 0){
>      Init();
> }
> but for mouse input it doesnt seem to work as easy ive tried
> if (MOUSEEVENTF_LEFTDOWN == true){
>
> }
> when i highlight the word Mouseevent word it says 0x0002 so i also tried
> if (MOUSEEVENTF_LEFTDOWN != 0x0002) in case that is its state when not 
> pressed but didnt work either
>
> it always compiles when i use either of these but doesnt enter the code block 
> after it.. am i well off?

Just because it compiles doesn't mean it's right. I don't know much
about mouse programming in the Windows API, and I hope someone else
will pipe in here, but I don't think that is the right way to handle
mouse events. I think you want to handle the WM_LBUTTONDOWN message
(and you may need to handle WM_LBUTTONUP message):

http://msdn2.microsoft.com/en-us/library/ms645607.aspx

-- Brett
------------------------------------------------------------
"In the rhythm of music a secret is hidden;
    If I were to divulge it, it would overturn the world."
               -- Jelaleddin Rumi

Reply via email to