|
void __fastcall TForm1::Edit1KeyDown(TObject *Sender, WORD &Key,
TShiftState Shift)
{
if(Key==VK_RETURN || Key == VK_DOWN){ // Forward.
SelectNext(ActiveControl, true, true);
Key = 0;
}
else if(Key == VK_UP){ // BackWard.
SelectNext(ActiveControl, false, true);
Key = 0;
}
}
"혹은"
void __fastcall TForm1::Edit1KeyDown(TObject *Sender, WORD &Key,
TShiftState Shift)
{
if(Key==VK_RETURN || Key == VK_DOWN){ // Forward.
Perform(WM_NEXTDLGCTL,0,0);
Key = 0;
}
else if(Key == VK_UP){ // BackWard.
Perform(WM_NEXTDLGCTL,1,0);
Key = 0;
}
}
"혹은"
void __fastcall TForm1::Edit1KeyDown(TObject *Sender, WORD &Key,
TShiftState Shift)
{
if(Key==VK_RETURN || Key == VK_DOWN){ // Forward.
SendMessage(Handle,WM_NEXTDLGCTL,0,0);
Key = 0;
}
else if(Key == VK_UP){ // BackWard.
SendMessage(Handle,WM_NEXTDLGCTL,1,0);
Key = 0;
}
}
|