• Advertisement
Sign in to follow this  

VK keys...

This topic is 4976 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
Advertisement
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
Check here. I don't think there are codes like VK_A by default, but you can set up your own constants or #defines using the number codes provided on that page.

Share this post


Link to post
Share on other sites
Oh ok..

#define VK_A 0x41

that works... I'll just got thru and build a list of A-Z.

Appreciate the help, take care...

-Dan Joseph

Share this post


Link to post
Share on other sites
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
Sign in to follow this  

  • Advertisement