?? menu.h
字號:
//***************************************
// Menu.h: interface for the Menu class.*
//***************************************
#if !defined(_MENU_DEF__)
#define _MENU_DEF__
#ifndef BORLANDC
#include <stdlib.h>
#include <string.h>
inline void clrscr() // Clear screan function
{
system ( "cls" );
}
#else
#include <conio.h>
#endif
#define MAX_MENU_NUMBER 20 // The max Menu number is 20
class Menu
{
private:
char mTitle[100]; // Menu Title
int mItemNumber; // Menu Items number
char * mMenuItems[MAX_MENU_NUMBER]; // Pointrer to array
public:
int MakeChoice(); // Get the choice from user
void Display(); // Display the choice
Menu(); // Default constructor
Menu( char * Title, char * CharItems[], int NoOfItems ); // Normal constructor
~Menu(); // Destructor
void SetTitle ( char * Title ) // Set the Title for the Menu
{ strcpy ( mTitle, Title ); }
};
void EatKeys(); // To clean the input stream
#endif
//***********************************************************************
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -