mbar.cpp

来自「飞虹 vision仿windows开发」· C++ 代码 · 共 50 行

CPP
50
字号
#include"\sunshine\include\mbar.h"
#include"\sunshine\include\app.h"
#include"\sunshine\include\define.h"
void MBar::UnFocus()
  {
	Mouse am(1);
	setfillstyle(SOLID_FILL,LIGHTGRAY);
	bar(x(),y(),x()+w()-1,y()+h()-1);
	setcolor(BLACK);
	line(x(),y(),x()+w()-1,y());
	line(x(),y()+h()-1,x()+w()-1,y()+h()-1);
	setcolor(WHITE);
	line(x(),y()+1,x()+w()-1,y()+1);
	setbkcolor(BLACK);
  }
void MBar::GetFocus()
 {
 }
int MBar::Process()
 {
  if(firstrun){ UnFocus();firstrun=0;return 1;}
  return 1;
 }
void MStatus::UnFocus()
 {
	Mouse am(1);
	setfillstyle(SOLID_FILL,LIGHTGRAY);
	bar(x(),y(),x()+w()-1,y()+h()-1);
	setcolor(BLACK);
	line(x(),y(),x()+w()-1,y());
	line(x(),y()+h()-1,x()+w()-1,y()+h()-1);
	setcolor(WHITE);
	line(x(),y()+1,x()+w()-1,y()+1);
	setbkcolor(BLACK);
 }
void MStatus::GetFocus()
 {
	setfillstyle(SOLID_FILL,LIGHTGRAY);
	bar(x(),y()+2,x()+w()-1,y()+w()-2);
	Write((char *)Mp,x()+20,y()+4,RED);
 }
int MStatus::Process()
 {
	if(firstrun){firstrun=0;UnFocus();return 1;}
	if(Mes==SENDTEXT){ Mes=1;
							 GetFocus();
						  }
	return  1;
 }

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?