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

📄 eeb_fix.cpp

📁 基于ARM平台的控制系统,自己带有MINIGUI,可以直接在VC下运行界面演示程序
💻 CPP
字号:
#include "eeb_AppWnd.h"

void NANA_FixMode::OnCreate(void)
{
    int i;
    int j;
    for(i=0;i<4;i++)
    {
        w_Temp[i].CreateWnd(this,2+80 * i,30,75,25);
        w_Temp[i].SetValue(0);
        w_Temp[i].SetIcon(ICON16_OC);
        w_Temp[i].w_Label.Set((enum _STRINGID_)((int)strFixTempIn0+i));
        w_Temp[i].w_Name.Set((enum _STRINGID_)((int)strFixTempIn0+i));
        w_Temp[i].SetValueRange(0,30);
        w_Temp[i].SetLock(1);
    }
    
    for(i=0;i<4;i++)
    {
        w_Press[i].CreateWnd(this,2 + 80 * i,30+25,75,25);
        w_Press[i].SetValue(0);
        w_Press[i].w_Label.Set((enum _STRINGID_)((int)strFixPressIn0+i));
        w_Press[i].w_Name.Set((enum _STRINGID_)((int)strFixPressIn0+i));
        w_Press[i].SetValueRange(0,30);
        w_Press[i].SetLock(1);
    }
    for(j=0;j<2;j++)
    {
        for(i=0;i<8;i++)
        {
            w_BtnDO[i+j*8].CreateWnd(this,40 * i,80 + j * 25,40,25);
            w_BtnDO[i+j*8].SetCaption(GetStringResource(
                (enum _STRINGID_)((int)strFixDO0 +i + j * 8)));

            if(g_pDOPin[ i + j * 8 ]->IsPortOn())
            {
                w_BtnDO[i+j*8].SetIcon(w_DOCaption[0]);       
            }else
            {
                w_BtnDO[i+j*8].SetIcon(w_DOCaption[1]);       
            }
            w_BtnDO[i+j*8].SetStyleEx(BUTTON_STYLE_NORMAL);
        }
    }
    NANA_LinkedWnd::OnCreate();
}

void NANA_FixMode::OnPaint(void)
{

    NANA_LinkedWnd::OnPaint();
}


void NANA_FixMode::OnNotify(NANAWnd *pSrcWnd,int nMessageCode,int param1,int param2)
{
    NANA_LinkedWnd::OnNotify(pSrcWnd,nMessageCode,param1,param2);
    int i;
    for(i=0;i<_MAX_DO_;i++)
    {
        if(pSrcWnd == &w_BtnDO[i] )
        {
            if(g_pDOPin[i]->IsPortOn())
            {
                g_pDOPin[i]->SetPort(0);
            }else
            {
                g_pDOPin[i]->SetPort(1);
            }

            if(g_pDOPin[i]->IsPortOn())
            {
                w_BtnDO[i].SetIcon(w_DOCaption[0]);
            }else
            {
                w_BtnDO[i].SetIcon(w_DOCaption[1]);
            }
            break;
        }
    }
    
}

⌨️ 快捷键说明

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