Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


key numbers


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 hello_there   Members   -  Reputation: 122

Like
Likes
Like

Posted 28 November 2001 - 05:51 PM

can someone please tell me the numbers for the keys or tell me where i can find them. also when i press alt my programme crashes anyone know why? (i can''t get my collision detection working i know it''s easy but it want work it''s making me go mad)

Sponsor:

#2 jacksonh   Members   -  Reputation: 122

Like
Likes
Like

Posted 29 November 2001 - 04:35 AM

I am assuming you mean the keys in Win32. All of the Virtual Keys (things like, alt, F1, tab, Shift, Escape) are defined in WinUser.h which is included in windows.h. To detected if a key is pressed, in your WindowProcedure do something like this:

case WM_KEYDOWN:
switch( LOWORD(wparam) ) {
case VK_ESCAPE: // Escape was pressed
// Do something
return 0;

case ''A'': // A Was pressed
// do something
return 0;

default: // A key we don''t care about was pressed
break;
}

Hope this helps






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS