📄 key.c
字号:
///////////////////////////////////////////////////////////////////////////////
// Functions relevant the keyboard operation //
///////////////////////////////////////////////////////////////////////////////
#include "Key.h"
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
// Function used for list box choice moving
void onkey(int nkey,PListCtrl plctrl)
{
switch(nkey)
{
case 5:
// Move up the current choice
ListCtrlSelMove(plctrl,-1,TRUE);
break;
case 12:
// Move down the current choice
ListCtrlSelMove(plctrl,1,TRUE);
break;
}
return;
}
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
// function used in watching introduction moular
U8 onKeyIntro(int nkey, int fnkey)
{
int SPosNO;
switch(nkey)
{
case 5:
onkey(5,pIntrodListCtrl);
break;
case 12:
onkey(12,pIntrodListCtrl);
break;
case 14:
// Display the introduction information
ClearScreen();
SPosNO = pIntrodListCtrl->CurrentSel;
ShowBmp(pdc,IntroName[SPosNO],161,20);
DrawListCtrl(pIntrodListCtrl);
break;
}
return FALSE;
}
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
// Function used in finding path by using list box function
U8 onKeyPath(int nkey, int fnkey)
{
// judge the current focus
U32 judge;
// Used for storing the choice number
int SPosNO;
int EPosNO;
switch(nkey)
{
U32 focusonst = ID_StartPosListBox;
U32 focusoned = ID_EndPosListBox;
judge = GetWndCtrlFocus(NULL);
case 8:
// Transform the focus to start point choose listbox
SetWndCtrlFocus(NULL, ID_StartPosListBox);
break;
case 10:
// Transform the focus to end point choose listbox
SetWndCtrlFocus(NULL, ID_EndPosListBox);
break;
case 5:
// Move up the current choice
if(judge == focusonst ) onkey(5,pStartPosListCtrl);
if(judge == focusoned ) onkey(5,pEndPosListCtrl);
break;
case 12:
// Move down the current choice
if(judge == focusonst ) onkey(12,pStartPosListCtrl);
if(judge == focusoned ) onkey(12,pEndPosListCtrl);
break;
case 14:
// Get the choice
SPosNO = pStartPosListCtrl->CurrentSel;
EPosNO = pEndPosListCtrl ->CurrentSel;
LB_Result[0] = SPosNO;
LB_Result[1] = EPosNO;
// Diapaly the result
DisplayResult(pdc,LB_Result,PlacePointArray);
break;
}
return FALSE;
}
// over
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -