添加成员变量 [英] Adding member variable
问题描述
这些天来,我一直在使用VC ++ 6.0.
最近切换到2005版,但是在这里我发现很难在控件中添加甚至简单的成员变量.
我创建了一个基于对话的项目.
我试图将成员变量添加到ListBox中,并且这样做,它会显示一个错误消息框,提示发生了运行时错误.对象不支持此属性或方法".
我尝试添加成员变量的方式是:
将列表框拖到对话框中,右键单击并选择添加变量".
这时我得到了上面提到的错误.
如果不是这样,我该怎么办?
在为新对话创建类时遇到了同样的事情.
Hi,
I''ve been using VC++ 6.0 all these days.
Recently switched to 2005 edition, but here I''m finding it difficult to add even a simple member variable to the controls.
I created a dialogue based project.
I was trying to add member variable to a ListBox and on doing this it displays an error message box saying "Run Time error has occured. Object doesn''t support this property or method".
The way I tried to add a member variable is:
Drag a ListBox onto the dialogue box, right click and select "Add Variable".
At this time I get the above mentioned error.
If this is not the way, how do I do it?
Same thing I''ve encountered while creating class for new dialogues.
推荐答案
我的2005版本为8.0.50727.762 sp 050727-7600.
我创建了一个基于MFC对话框的应用程序
拖到列表框上
右键单击添加变量"
然后,它出现了一个窗口,允许您选择控件或数据类型,我选择了控件类型,单击确定",一切似乎都很好.
我知道的安慰并不多,但是这让我认为您的问题必须出在您的安装上,请尝试重新安装和应用最新的Service Pack.
I have 2005 version 8.0.50727.762 sp 050727-7600.
I created an MFC Dialog based app
Dragged on a list box
Right click ''Add Variable''
It then came up with the window that allows you to choose a control or data type, I chose a control type, clicked ok and everything seemed fine.
Not much consolation I know, but that makes me think your problem must be down to your installation, try reinstalling and applying upto date service packs.
C ++/CLI和C#容易得多用于GUI开发
C++/CLI and C# are a lot easier to use for GUI development
这篇关于添加成员变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!