新建一个MFC project(比如是dialog),在菜单project->add to project->files中选入那两个文件,如果dialog中有button,在ctrl+w后选中其中一页(好像是第二页)然后为dialog的某按钮选择control类,这样dialog的.h文件中会重现CButton x,include Button_ww.h后将CButton改为Button_ww.h中定义的类名。
“还是没有解决, 按CTRL+F7编译时出现信息框: Cannot compile the file 'c:\wwDlg.h';no compile tool is associated with the extension 但是按下F7进行Build正常,运行正常。”这不是问题,CTRL+F7仅编译当前选中的文件,如果当前是头文件就会有那个提示。选中一个.CPP文件再CTRL+F7就不会有了。
去定义你的按扭对象。再Create();
自己去找些例子看
www.vckbase.com
www.vccode.com
按CTRL+F7编译时出现信息框:
Cannot compile the file 'c:\wwDlg.h';no compile
tool is associated with the extension
但是按下F7进行Build正常,运行正常。
在DIALOG的头文件中定义
CRoundButton bt;然后在
OnInitDialog(...)中
bt.SubclassDlgItem(IDC_BUTTON,this);
就可以了。
按CTRL+F7编译时出现信息框:
Cannot compile the file 'c:\wwDlg.h';no compile
tool is associated with the extension
但是按下F7进行Build正常,运行正常。”这不是问题,CTRL+F7仅编译当前选中的文件,如果当前是头文件就会有那个提示。选中一个.CPP文件再CTRL+F7就不会有了。