Jump to content
  • Advertisement
Sign in to follow this  
emforce

buttons

This topic is 3317 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 guys i am just starting directx 10 programming and have an app that shows a blue screen the fps and milliseconds in the top corner. i was just wondering how i would implement a button which could toggle the RECT R that i use for the text on and off? please help me and maybe give me some sample code? thanks alot guys :D

Share this post


Link to post
Share on other sites
Advertisement
OMG thank you soo much i was worried that this knowledge was not getting through to me when reading the book but you pointed me in the right direction and it works!

I have to admit i am feeling a kind of rush right now :D

Share this post


Link to post
Share on other sites
Quote:
Original post by emforce
btw how do you get it to only register a certain key?
The wParam value contains the virtual key code of the key being pressed:

case WM_KEYDOWN:
{
if(wParam == 'X')
{
// X was pressed
}
else if(wParam == VK_UP)
{
// Up arrow was pressed
}

// etc
}
break;

Share this post


Link to post
Share on other sites
Quote:
Original post by emforce
is there a list i could find anywhere that contains the virtual key code?
Yup: Virtual-Key Codes. The A-Z keys have the same values as the upper case ASCII representation, which is why in the above example 'X' works in the same way as other VK_* values.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!