关于rc文件中的DDX_Control()和CONTROL [英] About DDX_Control() and CONTROL in rc file

查看:241
本文介绍了关于rc文件中的DDX_Control()和CONTROL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

部分代码如下:

Part of the code is as below:

IDD_CONNECTOBJECT_DIALOG DIALOGEX 0, 0, 280, 142
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_APPWINDOW
CAPTION "ConnectObject"
FONT 8, "MS Sans Serif"
BEGIN
    CONTROL         "",IDC_OPCDATACTRL2,   //IDC_OPCDATACTRL1
                    "{FECBB6D0-6378-4B3E-A0EC-DCB28655BB55}",WS_TABSTOP,131,
                    112,17,17
    EDITTEXT        IDC_EDIT1,95,54,81,16,ES_AUTOHSCROLL | NOT WS_TABSTOP,
                    WS_EX_RIGHT
    PUSHBUTTON      "Disconnect",IDC_BUTTON1,151,84,61,22
    PUSHBUTTON      "ConnectObject",IDC_BUTTON2,68,84,71,21
    LTEXT           "This example uses the ConnectObject method to setup a subscription read and get the data back in the ValueChanged() event of the OPC data control and then update the text box below.  This is all done programmatically in the code in this example. ",
                    IDC_STATIC,7,7,258,38
END








void CConnectObjectDlg::DoDataExchange(CDataExchange* pDX)
{
    CDialog::DoDataExchange(pDX);
    //{{AFX_DATA_MAP(CConnectObjectDlg)
    DDX_Control(pDX, IDC_EDIT1, m_EditControl);
    DDX_Control(pDX, IDC_OPCDATACTRL2 , m_OPCDataControl);
    //}}AFX_DATA_MAP
}



-------------------------------------------------- --------------------------

任何人都可以在两部分中友好地解释一下IDC_OPCDATACTRL2的含义,以及在rc文件中编写的第一部分中CONTROL部分的含义吗?



----------------------------------------------------------------------------

Can anyone kindly explain what is the meaning of IDC_OPCDATACTRL2 in both parts and also what is the meaning of the CONTROL part in the first part written in rc file?

Thanks ahead!

推荐答案

您想知道的有关RC文件中对话框的所有信息

http://msdn.microsoft.com/en-us/library/aa381002(VS .85).aspx [ ^ ]
Everything you wanted to know about Dialog Boxes in the RC file

http://msdn.microsoft.com/en-us/library/aa381002(VS.85).aspx[^]


这篇关于关于rc文件中的DDX_Control()和CONTROL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆