   How can I convert a Virtual Key code into a ASCII Code in C++
  I''m using Direct X, and I want to be able to emulate a gets() function.  But when I get the WM_KEYDOWN message, it gives me the key pressed as a virtual key, and the char variable type stores it as an ascii code.  I figure I need to convert from virtual key to ascii.  If anyone knows of a better way to do this, share!Thanks 
  Is your window receiving WM_CHAR messages? ;  The wParam variable in the WndProc function converts directly into the correct character. case WM_CHAR:{// if its a letter (uppercase or lower)if((wParam > 64 && wParam < 91) || (wParam > 96 && wParam < 123))// Then set CurrentKeyDown to wParamchar CurrentKeyDown = wParam; return 0;} /*I use DirectX 8.1 and C++ (Microsoft Visual C++ 6.0 Professional edition)*/ ;  ToAscii() and ToAsciiEx() convert virtual-key codes to ascii chars. 