Esempio n. 1
0
static BOOL OnKeyControl(BYTE bt)
{
	switch(bt)
	{
		case VK_RETURN:
		{
			DoCommand();			
			PrintPrompt();
		}
		break;
		case VK_BACKSPACE:
		{
			WORD CursorX = 0;
			WORD CursorY = 0;

			CD_GetCursorPos(&CursorX,&CursorY);
			if(CursorX <= strlen(s_szPrompt))
			{
				break;
			}

			CD_DelChar(DISPLAY_DELCHAR_PREV);
		}
		break;	
		default:
		{
			CD_PrintChar(bt);
		}
	}

	return TRUE;
}
Esempio n. 2
0
void PrintCh(unsigned short ch)
{
	CD_PrintChar((CHAR)ch);
}