|
계산기 만들고 있는데요....
숫자로 번호나 기호를 입력합니다...
근데 @ 나 % * 같은걸 입력하려고 하는데...
쉬프트 누르고 선택을 하면 @나 % * 이 입력이 안되고
2 5 8 이런 숫자로 입력 됩니다..
이거 어떻게 처리 해야 하나요?
아래 소스처럼 꽁수로 쉬프트+2 누르면 @ 나오고 이런 방법으로 해도 안되더군요....
키보드 입력 부분만 소스 올립니다..
답변 부탁드립니다....
void __fastcall TfrmMain::FormKeyDown(TObject *Sender, WORD &Key, //키보드로 입력하기 위한 함수
TShiftState Shift)
{
if (Key == '1')
btn1Click(this);
else if (Key == '2')
btn2Click(this);
else if (Key == '3')
btn3Click(this);
else if (Key == '4')
btn4Click(this);
else if (Key == '5')
btn5Click(this);
else if (Key == '6')
btn6Click(this);
else if (Key == '7')
btn7Click(this);
else if (Key == '8')
btn8Click(this);
else if (Key == '9')
btn9Click(this);
else if (Key == '0')
btn0Click(this);
else if (Key == VK_BACK)
btnBSClick(this);
else if (Key == VK_ESCAPE)
btnCClick(this);
else if (Key == VK_DELETE)
btnCEClick(this);
else if (Key == VK_F9)
btnPMClick(this);
else if (Key == 'R')
btn1perxClick(this);
else if(Shift.Contains(ssCtrl)) {
switch (Key) {
case 'L' : btnMCClick(this);
case 'R' : btnMRClick(this);
case 'M' : btnMSClick(this);
case 'P' : btnMPClick(this);
}
}
else if(Shift.Contains(ssShift)) {
switch (Key) {
case '2' : btnsqrtClick(this);
case '5' : btnPerClick(this);
}
}
}
|