实现效果如图:
代码如下:
#include<stdio.h>
#include<graphics.h>
#include<conio.h>
#include<string.h>
//按钮属性
typedef struct Button
{
int x;
int y;
int xx;
int yy;
COLORREF color;
char* buttonstr;
}*LPBTN;
//按键封装
LPBTN createButton(int x, int y, int xx, int yy, COLORREF color, const char* buttonstr)
{
LPBTN button = (LPBTN)malloc(sizeof(LPBTN));
button->x = x;
button->y = y;
button->xx = xx;
button