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

📄 rawwin.cpp

📁 嵌入式计算机及接口技术
💻 CPP
字号:
#include "RawWin.h"
//#define as 78
  RawWin::RawWin()
 {
 
 
 /*******************************/
    this->BackColor=Face;
//    strcopy(this->Caption,(char*)Firstwin_Title);

    this->SetCaption("原料管理窗口");

    this->ClassType=ClassIDWin; //设置本窗口为主窗口



/***************************/
     Button1.Left=70;
     Button1.Top=200;
     Button1.Width=100;
     Button1.Height=24;
     Button1.SetCaption("原料详细信息");
     this->AddChird(&Button1);



/***************************/
     Button2.Left=70;
     Button2.Top=240;
     Button2.Width=100;
     Button2.Height=24;
     Button2.SetCaption("生产批号关联");
     this->AddChird(&Button2);

/***************************/

     Button3.Left=70;
     Button3.Top=280;
     Button3.Width=100;
     Button3.Height=24;
     Button3.SetCaption("清除输入内容");
     this->AddChird(&Button3);













/************显示编辑筐******************/
     Edit1.Left=20;
     Edit1.Top=120;
     Edit1.Width=200;
     Edit1.Height=24;
     Edit1.FontColor=Yellow;
     Edit1.BackColor=Blue;
     Edit1.SetContend("");

     this->AddChird(&Edit1);

/************显示编辑筐******************/
 /*    Edit2.Left=100;
     Edit2.Top=80;
     Edit2.Width=120;
     Edit2.Height=24;
     Edit2.FontColor=Yellow;
     Edit2.BackColor=Blue;
     Edit2.SetContend("");

     this->AddChird(&Edit2);*/
/************显示编辑筐******************/
/*     Edit3.Left=100;
     Edit3.Top=120;
     Edit3.Width=120;
     Edit3.Height=24;
     Edit3.FontColor=Yellow;
     Edit3.BackColor=Blue;
     Edit3.SetContend("");*/

//     this->AddChird(&Edit3);
/************显示编辑筐******************/
  /*   Edit4.Left=100;
     Edit4.Top=160;
     Edit4.Width=120;
     Edit4.Height=24;
     Edit4.FontColor=Yellow;
     Edit4.BackColor=Blue;
     Edit4.SetContend("");

     this->AddChird(&Edit4);*/



/***********显示标签****************/
     Lable1.Left=20;
     Lable1.Top=80;
     Lable1.Width=80;
     Lable1.Height=24;
     Lable1.FontColor=Black;
     Lable1.SetCaption("请输入系统采集的原料编号");
  
     this->AddChird(&Lable1);

/***********显示标签****************/
/*     Lable2.Left=10;
     Lable2.Top=80;
     Lable2.Width=80;
     Lable2.Height=24;
     Lable2.FontColor=Black;
     Lable2.SetCaption("原料来源");
  
     this->AddChird(&Lable2);*/
/***********显示标签****************/
/*     Lable3.Left=10;
     Lable3.Top=120;
     Lable3.Width=80;
     Lable3.Height=24;
     Lable3.FontColor=Black;
     Lable3.SetCaption("原料批次");
  
     this->AddChird(&Lable3);*/
/***********显示标签****************/
  /*   Lable4.Left=10;
     Lable4.Top=160;
     Lable4.Width=80;
     Lable4.Height=24;
     Lable4.FontColor=Black;
     Lable4.SetCaption("加工时间");
  
     this->AddChird(&Lable4);*/

  };
/********************************/
/*消息处理函数**/
  
  void  RawWin::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 RawWin::k1_Click(void)
  {
  
        Msg.MsgID=PassRawId;
        Msg.Msg=&Edit1.Text[0];
        
        WinRawView->Message(Msg);  //传递原料编号
        WinRawView->Active(); 
  };
  
  void RawWin::k2_Click(void)
  {

        Msg.MsgID=PassRawId;
        Msg.Msg=&Edit1.Text[0];
        
        WinRawProductRelation->Message(Msg);  //传递原料编号
        WinRawProductRelation->Active(); 
  };

  void RawWin::k3_Click(void)
  {
    this->Edit1.Clear();
    };

⌨️ 快捷键说明

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