Brett McCoy wrote:
> 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

Windows relies on message handlers BUT OpenGL-based apps. usually have a 
different way of handling messages.  Been a long time since I touched 
the stuff.  You'll probably get more mileage asking in the forums on 
www.gamedev.net.  BTW, the code above seems insufficient to decipher the 
actual problem, but I'm pretty sure you aren't doing it right.  OpenGL 
might be eating the mouse message before your code.

-- 
Thomas Hruska
CubicleSoft President
Ph: 517-803-4197

*NEW* MyTaskFocus 1.1
Get on task.  Stay on task.

http://www.CubicleSoft.com/MyTaskFocus/

Reply via email to