📄 secondwin.cpp
字号:
#include "SecondWin.h"
//#define as 78
SecondWin::SecondWin()
{
/*******************************/
this->BackColor=Face;
// strcopy(this->Caption,(char*)Firstwin_Title);
this->SetCaption("第二号控制窗口");
this->ClassType=ClassIDWin; //设置本窗口为主窗口
/***************************/
Button1.Left=30;
Button1.Top=80;
Button1.Width=40;
Button1.Height=24;
Button1.SetCaption("启动");
this->AddChird(&Button1);
/***************************/
Button2.Left=80;
Button2.Top=80;
Button2.Width=40;
Button2.Height=24;
Button2.SetCaption("工作");
this->AddChird(&Button2);
/***************************/
Button3.Left=130;
Button3.Top=80;
Button3.Width=40;
Button3.Height=24;
Button3.SetCaption("检查");
this->AddChird(&Button3);
/************显示编辑筐******************/
Edit1.Left=100;
Edit1.Top=120;
Edit1.Width=120;
Edit1.Height=24;
Edit1.FontColor=Yellow;
Edit1.BackColor=Blue;
Edit1.SetContend("海洋大学");
this->AddChird(&Edit1);
/***********显示标签****************/
Lable1.Left=10;
Lable1.Top=30;
Lable1.Width=40;
Lable1.Height=24;
Lable1.FontColor=Black;
Lable1.SetCaption("显示内容");
this->AddChird(&Lable1);
};
/********************************/
/*消息处理函数**/
void SecondWin::Message(MessageBody SystemMsg)
{
this->SysMessageCheck( SystemMsg);
switch(SystemMsg.MsgID)
{
case Sys_Msg_BtnClick:
if(SystemMsg.Parm1==0)
{
k1_Click();
};
if(SystemMsg.Parm1==1)
{
k2_Click();
};
if(SystemMsg.Parm1==2)
{
k3_Click();
};
break;
default: break;
}
};
/*按钮事件相应函数*/
void SecondWin::k1_Click(void)
{
this->Edit1.SetContend("海洋导航系统");
this-> Lable1.FontColor=Blue;
this->Edit1.Refresh();
this-> Lable1.Refresh();
// this->Button1.Refresh();
};
void SecondWin::k2_Click(void)
{
this->Edit1.SetContend("海洋导航系统");
this-> Lable1.FontColor=Blue;
this->Edit1.Refresh();
this-> Lable1.Refresh();
};
void SecondWin::k3_Click(void)
{
this->Edit1.SetContend("海洋导航系统");
this-> Lable1.FontColor=Blue;
this->Edit1.Refresh();
this-> Lable1.Refresh();
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -