Jump to content

View more

Image of the Day

The night is still, but the invasion brings chaos. #screenshotsaturday #hanako #indiegame #gameart #ue4 #samurai https://t.co/cgILXuokoS
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

key numbers

4: Adsense

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   

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)

#2 jacksonh   Members   

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.