⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 thirdwin.cpp

📁 嵌入式计算机及接口技术
💻 CPP
字号:
#include "ThirdWin.h"
//#define as 78
  ThirdWin::ThirdWin()
 {
 
 
 /*******************************/
    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);



/***************************/
 //    LableKey.Left=210;
 //    LableKey.Top=290;
 //    LableKey.Width=25;
 //    LableKey.Height=24;
   //  LableKey.FontColor=Red;
   //  LableKey.BackColor=Green;
 //    LableKey.SetCaption("≌*");
 //    this->AddChird(&LableKey);




/***********显示标签****************/
     Lable1.Left=10;
     Lable1.Top=30;
     Lable1.Width=40;
     Lable1.Height=24;
     Lable1.FontColor=Black;
     Lable1.SetCaption("显示内容");
//  Lable1.BackColor=Fuchsia;
//     strcopy( Lable1.Caption,(char*)Lable1_Title);
  
     this->AddChird(&Lable1);






/************显示编辑筐******************/
     Edit1.Left=100;
     Edit1.Top=140;
     Edit1.Width=120;
     Edit1.Height=24;
     Edit1.FontColor=Yellow;
     Edit1.BackColor=Blue;
     Edit1.SetContend("海洋大学");

     this->AddChird(&Edit1);



  };
/********************************/
/*消息处理函数**/
  
  void  ThirdWin::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 ThirdWin::k1_Click(void)
  {
  
    this->Edit1.SetContend("海洋导航系统");
    this->  Lable1.FontColor=Blue;   

    this->Edit1.Refresh();
    this->  Lable1.Refresh();
 //   this->Button1.Refresh();  
  
  };
  
  void ThirdWin::k2_Click(void)
  {
  
    this->Edit1.SetContend("明天还要上课");
    this->  Lable1.FontColor=Red;   
   // this->Label1.SetCaption("我的内容");
 
    this->Edit1.Refresh();
    this->  Lable1.Refresh();
  //  this->Button2.Refresh();  
    
  };

  void ThirdWin::k3_Click(void)
  {
  
    this->Edit1.SetContend("每天忙的要命");
   // this->Label1.SetCaption("我的内容");
    this->  Lable1.FontColor=Green;   

    this->Edit1.Refresh();
    this->  Lable1.Refresh();
    
  //  this->Button3.Refresh();  
  
  };
  

⌨️ 快捷键说明

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