The Machine Perception Toolbox

[Introduction]- [News]- [Download]- [Screenshots]- [Manual (pdf)]- [Forums]- [API Reference]- [Repository ]

 

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Projectsbox.cpp

Go to the documentation of this file.
00001 // Projectsbox.cpp : implementation file
00002 //
00003 
00004 #include "stdafx.h"
00005 #include "VideoDemo.h"
00006 #include "Projectsbox.h"
00007 #include "MPDirectShow.h"
00008 
00009 #ifdef _DEBUG
00010 #define new DEBUG_NEW
00011 #undef THIS_FILE
00012 static char THIS_FILE[] = __FILE__;
00013 #endif
00014 
00016 // Projectsbox dialog
00017 
00018 
00019 Projectsbox::Projectsbox(CWnd* pParent /*=NULL*/)
00020         : CDialog(Projectsbox::IDD, pParent)
00021 {
00022         //{{AFX_DATA_INIT(Projectsbox)
00023         //}}AFX_DATA_INIT
00024 }
00025 
00026 
00027 void Projectsbox::DoDataExchange(CDataExchange* pDX)
00028 {
00029         CDialog::DoDataExchange(pDX);
00030         //{{AFX_DATA_MAP(Projectsbox)
00031         DDX_Control(pDX, IDC_COMBO_InputSize, m_selectSize);
00032         DDX_Control(pDX, IDC_COMBO_Projects, m_selectProject);
00033         //}}AFX_DATA_MAP
00034 
00035         for (int i = 0; i < NUM_PROJECTS; i++)
00036                 m_selectProject.InsertString(i, ds_projectNames[i]);
00037         m_selectProject.SetCurSel(0);
00038 
00039         m_selectSize.InsertString(0, "160x120"); 
00040         m_selectSize.InsertString(1, "320x240");
00041         m_selectSize.InsertString(2, "640x480");
00042         m_selectSize.SetCurSel(1);
00043 
00044 }
00045 
00046 
00047 BEGIN_MESSAGE_MAP(Projectsbox, CDialog)
00048         //{{AFX_MSG_MAP(Projectsbox)
00049         ON_CBN_DROPDOWN(IDC_COMBO_Projects, OnDropdownCOMBOProjects)
00050         ON_CBN_SELCHANGE(IDC_COMBO_Projects, OnSelchangeCOMBOProjects)
00051         ON_CBN_DROPDOWN(IDC_COMBO_InputSize, OnDropdownCOMBOInputSize)
00052         ON_CBN_SELCHANGE(IDC_COMBO_InputSize, OnSelchangeCOMBOInputSize)
00053         //}}AFX_MSG_MAP
00054 END_MESSAGE_MAP()
00055 
00057 // Projectsbox message handlers
00058 
00059 void Projectsbox::setDirectShow(MPDirectShow* directShow)
00060 {
00061         m_directShow = directShow;
00062 }
00063 
00064 void Projectsbox::OnDropdownCOMBOProjects() 
00065 {
00066 }
00067 
00068 void Projectsbox::OnSelchangeCOMBOProjects() 
00069 {
00070         int proj = m_selectProject.GetCurSel();
00071         m_directShow->SetProject((ds_project)proj);
00072 }
00073 
00074 void Projectsbox::OnDropdownCOMBOInputSize() 
00075 {
00076 }
00077 
00078 void Projectsbox::OnSelchangeCOMBOInputSize() 
00079 {
00080         int size = m_selectSize.GetCurSel();
00081         switch (size) {
00082         case 0:
00083                 m_directShow->SetInput(160, 120);
00084                 break;
00085         case 1:
00086                 m_directShow->SetInput(320, 240);
00087                 break;
00088         case 2:
00089                 m_directShow->SetInput(640, 480);
00090                 break;
00091         default:
00092                 m_directShow->SetInput(160, 120);
00093                 break;
00094         }
00095 }

Generated on Mon Nov 8 17:07:47 2004 for MPT by  doxygen 1.3.9.1