1:首先创建一个MFC的对话框工程,并拉几个按钮(本文中假设3个,Button1(Photo_Test),Button2(Video_Test),Button3(Camera_Test))放在对话框上。(主界面情况)

MFC做界面切换

2:往工程里添加3个类(CTestC,CTestP,CTestV),基类是CDialog. 

3:在工程头文件(XXXXDlg.h)中包含每个子对话框类的头文件#include  "TestC.h" ,#include  "TestP.h" ,#include  "TestV.h" 

4:.在XXXXDlg.cpp中声明新建子类对象
CTestC testC;
CTestP testP;

CTestV testV;

5:主界面里面的三个按钮代码

MFC做界面切换

6:框架完成(前面都是大致记忆内容,不一定写全了)

MFC做界面切换

相关文章:

  • 2021-12-31
  • 2021-11-24
  • 2021-09-07
  • 2021-11-18
  • 2021-11-24
  • 2021-12-07
  • 2021-12-15
  • 2021-08-15
猜你喜欢
  • 2021-08-02
  • 2021-08-15
  • 2021-08-12
  • 2021-11-24
  • 2021-12-03
  • 2021-11-24
  • 2021-11-24
  • 2021-09-08
相关资源
相似解决方案