Solved

# What does this statement mean

Posted on 2006-03-31
191 Views
What does these statements mean?

case 0x50:  // How is this value generated?
Pause(hwnd);
break;
0
Question by:khawaib

LVL 30

Expert Comment

Hi khawaib,
> case 0x50:  // How is this value generated?
It's a hex value that translates into decimal number 80.
case 80: //Same as 0x50

David Maisonave (Axter)
Cheers!
0

Author Comment

How is this value generated?
0

LVL 30

Expert Comment

>>How is this value generated?
At compile time, the compiler converts it to a decimal number.
0

Author Comment

case WM_KEYDOWN:
switch ((int)wParam){
case VK_UP:    // Code Here
break;
case VK_DOWN:    // Code Here
break;
case VK_LEFT:     // Code Here
break;
case VK_RIGHT:     // Code Here
break;
case 0x50:
Pause(hwnd);
break;
}
break;
default:
..................
0

Author Comment

this might clearify it bit more
0

LVL 30

Expert Comment

>>this might clearify it bit more

What exactly are you trying to clearify?

0

Author Comment

That this value is generated in keyboard events, I understand Key Up, down etc are generated when these keys are pressed, but what generates 0x50?
0

LVL 30

Expert Comment

>> but what generates 0x50?

Where did you get this number from?
0

Author Comment

Thats what I cannot see anywhere - I thougth may be some one else have accross something like this.
May be some one know some key which can generate this value?
0

LVL 48

Accepted Solution

From winuser.h:

* VK_A - VK_Z are the same as ASCII 'A' - 'Z' (0x41 - 0x5A)

So, you need to find 0x50 in ASCII table, this is 'P'. Program author could save your time, writing:

case (int)'P':
0

Author Comment

It is P key. thnx AlexFM
0

## Featured Post

The following diagram presents a diamond class hierarchy: As depicted, diamond inheritance denotes when two classes (e.g., CDerived1 and CDerived2), separately extending a common base class (e.g., CBase), are sub classed simultaneously by a fourt…
In Easy String Encryption Using CryptoAPI in C++ (http://www.experts-exchange.com/viewArticle.jsp?aid=1193) I described how to encrypt text and recommended that the encrypted text be stored as a series of hexadecimal digits -- because cyphertext may…
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…