Sign in to follow this  
djoseph74

VK keys...

Recommended Posts

djoseph74    122
Hi Everyone, I have:
if ( GetKeyState( VK_A )& 0x8000 )
{
	angle++;

	D3DXMatrixRotationY( DEG2RAD( angle ) );
}

if ( GetKeyState( VK_Z )& 0x8000 )
{
	angle--;

	D3DXMatrixRotationY( DEG2RAD( angle ) );
}
I'm getting undeclared indentifier for VK_A and VK_Z. As far as I can see, those should be legal. Help? -Dan Joseph

Share this post


Link to post
Share on other sites
djoseph74    122
Hmm I was under the impression that it was included with windows.h, but must be mistake. msdn.microsoft.com is coming up blank for me, only finding KeyEvent.VK_A etc for Java... I'll keep searching..

-Dan Joseph

Share this post


Link to post
Share on other sites
djoseph74    122
Hmm.. GetKeyState( A ) doesn't work, now, GetKeyState( 0x41 ) may work, I haven't tried it yet. Would make sense though.

#define VK_A 0x41

That solved it though.

-Dan Joseph

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this