16,472
社区成员
发帖
与我相关
我的任务
分享
typedef struct _TAG
{
int a;
int b;
}TAG;
CD1::CD1(CWnd* pParent, /*=NULL*/TAG* tag)
: CDialog(CD1::IDD, pParent)
{
Tag = tag;
}
void CD1::OnGet(TAG* tag)
{
//................................
if(Tag)//注意,Tag不是OnGet接收的tag,是构造函数中的Tag,也就是CD1的成员。
AfxMessageBox("a");
//................................
}
void CD1::OnGet(TAG* tag)
{
//................................
if(Tag)//注意,Tag不是OnGet接收的tag,是构造函数中的Tag,也就是CD1的成员。
AfxMessageBox("a");
//................................
}
TAG* tag = new TAG;
tag->a=1;
tag->b=2;
CD1* cd = new CD1(this, tag);