Original Post
This is REALLY starting to annoy me... I can't figure out why I can't call functions based on mouse events.
Basically, I use the following code to capture button presses:
case WM_LBUTTONDOWN:
{
if (uMsg == WM_LBUTTONDOWN)
{
rendershot = 'go';
}
return 0;
}
And I've got this code to render the gun shot effect (Inside the DrawGLScene loop):
if (rendershot == 'go')
{
Shoot();
}
Now, for some odd reason, these "tasks" refuse to work together.
I know the button-push capturing code works, because I threw the
function KillGLWindow in there, and it worked. I also know the
Shoot function works, because I rendered it in the DrawGLScene() loop by itself. I've tried several methods of making it work (changing "if (rendershot == 'go')" with "if (uMsg == WM_LBUTTONDOWN)" ), but nothing works.
Help!
[edited by - mrbugg on December 12, 2002 8:15:08 PM]