/* accepts & displays one keypress in the window */ /* process keypress */ case WM_CHAR: hdc = GetDC(hwnd); // get window handle /* erase old character */ // TYPE USE TextOut(hdc, // HDC handle of device context 1, // int x co-ord of starting pos 1, // int y co-ord of start " ", // LPCSTR address of string( or string) 2); // int no. of bytes in string sprintf(str,"%c", (char) wParam); // stringsize character TextOut(hdc,1,1,str,strlen(str)); // output char ReleaseDC(hwnd,hdc); // release dc break;