home *** CD-ROM | disk | FTP | other *** search
- // flagsvw.cpp : implementation file
- //
-
- #include "stdafx.h"
- #include "flags.h"
- #include "flagsvw.h"
-
- #ifdef _DEBUG
- #undef THIS_FILE
- static char BASED_CODE THIS_FILE[] = __FILE__;
- #endif
-
- /////////////////////////////////////////////////////////////////////////////
- // CFlagsView
-
- IMPLEMENT_DYNCREATE(CFlagsView, CFormView)
-
- CFlagsView::CFlagsView()
- : CFormView(CFlagsView::IDD)
- {
- //{{AFX_DATA_INIT(CFlagsView)
- m_midi = NULL;
- //}}AFX_DATA_INIT
- }
-
- CFlagsView::~CFlagsView()
- {
- }
-
- void CFlagsView::DoDataExchange(CDataExchange* pDX)
- {
- CFormView::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(CFlagsView)
- DDX_VBControl(pDX, IDC_TEGOMM1, m_midi);
- //}}AFX_DATA_MAP
- }
-
-
- BEGIN_MESSAGE_MAP(CFlagsView, CFormView)
- //{{AFX_MSG_MAP(CFlagsView)
- ON_VBXEVENT(VBN_CLICK, IDC_COMMAND3D_USA, OnClickCommand3dUsa)
- ON_BN_CLICKED(IDC_STOP_BUTTON, OnStopButton)
- ON_VBXEVENT(VBN_CLICK, IDC_COMMAND3D_ISRAEL, OnClickCommand3dIsrael)
- ON_VBXEVENT(VBN_CLICK, IDC_COMMAND3D_ENGLAND, OnClickCommand3dEngland)
- ON_VBXEVENT(VBN_CLICK, IDC_COMMAND3D_FRANCE, OnClickCommand3dFrance)
- ON_VBXEVENT(VBN_CLICK, IDC_COMMAND3D_JAPAN, OnClickCommand3dJapan)
- ON_VBXEVENT(VBN_CLICK, IDC_COMMAND3D_CANADA, OnClickCommand3dCanada)
- ON_VBXEVENT(VBN_CLICK, IDC_COMMAND3D_MEXICO, OnClickCommand3dMexico)
- ON_VBXEVENT(VBN_CLICK, IDC_COMMAND3D_NETHERLANDS, OnClickCommand3dNetherlands)
- ON_VBXEVENT(VBN_CLICK, IDC_COMMAND3D_CHINA, OnClickCommand3dChina)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
-
-
- /////////////////////////////////////////////////////////////////////////////
- // CFlagsView message handlers
-
-
- void CFlagsView::OnClickCommand3dUsa(UINT, int, CWnd*, LPVOID)
- {
- // TODO: Add your VBX event notification handler code here
-
- //////////////////////
- // MY CODE STARTS HERE
- //////////////////////
-
- // Close the MIDI device
- m_midi->SetStrProperty("Command", "Close");
-
- // Set the name of the MIDI file
- m_midi->SetStrProperty("FileName",
- "\\VCPROG\\MIDI\\ANTHEMS\\USA.MID" );
- // Open the MIDI file
- m_midi->SetStrProperty("Command", "Open");
-
- // Rewind the MIDI file
- m_midi->SetStrProperty("Command", "Prev");
-
- // Play the MIDI file
- m_midi->SetStrProperty("Command", "Play");
-
- ////////////////////
- // MY CODE ENDS HERE
- ////////////////////
-
-
- }
-
- void CFlagsView::OnStopButton()
- {
- // TODO: Add your control notification handler code here
-
- //////////////////////
- // MY CODE STARTS HERE
- //////////////////////
-
- // Stop the playback
- m_midi->SetStrProperty("Command", "Stop");
-
- ////////////////////
- // MY CODE ENDS HERE
- ////////////////////
-
- }
-
- void CFlagsView::OnClickCommand3dIsrael(UINT, int, CWnd*, LPVOID)
- {
- // TODO: Add your VBX event notification handler code here
-
- //////////////////////
- // MY CODE STARTS HERE
- //////////////////////
-
- // Close the MIDI device
- m_midi->SetStrProperty("Command", "Close");
-
- // Set the name of the MIDI file
- m_midi->SetStrProperty("FileName",
- "\\VCPROG\\MIDI\\ANTHEMS\\ISRAEL.MID" );
-
- // Open the MIDI file
- m_midi->SetStrProperty("Command", "Open");
-
- // Rewind the MIDI file
- m_midi->SetStrProperty("Command", "Prev");
-
-
- // Play the MIDI file
- m_midi->SetStrProperty("Command", "Play");
-
-
- ////////////////////
- // MY CODE ENDS HERE
- ////////////////////
-
- }
-
- void CFlagsView::OnClickCommand3dEngland(UINT, int, CWnd*, LPVOID)
- {
- // TODO: Add your VBX event notification handler code here
-
- //////////////////////
- // MY CODE STARTS HERE
- //////////////////////
-
- // Close the MIDI device
- m_midi->SetStrProperty("Command", "Close");
-
-
- // Set the name of the MIDI file
- m_midi->SetStrProperty("FileName",
- "\\VCPROG\\MIDI\\ANTHEMS\\ENGLAND.MID" );
-
- // Open the MIDI file
- m_midi->SetStrProperty("Command", "Open");
-
- // Rewind the MIDI file
- m_midi->SetStrProperty("Command", "Prev");
-
-
- // Play the MIDI file
- m_midi->SetStrProperty("Command", "Play");
-
-
- ////////////////////
- // MY CODE ENDS HERE
- ////////////////////
- }
-
- void CFlagsView::OnClickCommand3dFrance(UINT, int, CWnd*, LPVOID)
- {
- // TODO: Add your VBX event notification handler code here
-
- //////////////////////
- // MY CODE STARTS HERE
- //////////////////////
-
- // Close the MIDI device
- m_midi->SetStrProperty("Command", "Close");
-
-
- // Set the name of the MIDI file
- m_midi->SetStrProperty("FileName",
- "\\VCPROG\\MIDI\\ANTHEMS\\FRANCE.MID" );
-
- // Open the MIDI file
- m_midi->SetStrProperty("Command", "Open");
-
- // Rewind the MIDI file
- m_midi->SetStrProperty("Command", "Prev");
-
-
- // Play the MIDI file
- m_midi->SetStrProperty("Command", "Play");
-
-
- ////////////////////
- // MY CODE ENDS HERE
- ////////////////////
- }
-
- void CFlagsView::OnClickCommand3dJapan(UINT, int, CWnd*, LPVOID)
- {
- // TODO: Add your VBX event notification handler code here
-
- //////////////////////
- // MY CODE STARTS HERE
- //////////////////////
-
- // Close the MIDI device
- m_midi->SetStrProperty("Command", "Close");
-
-
- // Set the name of the MIDI file
- m_midi->SetStrProperty("FileName",
- "\\VCPROG\\MIDI\\ANTHEMS\\JAPAN.MID" );
-
- // Open the MIDI file
- m_midi->SetStrProperty("Command", "Open");
-
- // Rewind the MIDI file
- m_midi->SetStrProperty("Command", "Prev");
-
-
- // Play the MIDI file
- m_midi->SetStrProperty("Command", "Play");
-
-
- ////////////////////
- // MY CODE ENDS HERE
- ////////////////////
-
-
- }
-
- void CFlagsView::OnClickCommand3dCanada(UINT, int, CWnd*, LPVOID)
- {
- // TODO: Add your VBX event notification handler code here
-
- //////////////////////
- // MY CODE STARTS HERE
- //////////////////////
-
- // Close the MIDI device
- m_midi->SetStrProperty("Command", "Close");
-
-
- // Set the name of the MIDI file
- m_midi->SetStrProperty("FileName",
- "\\VCPROG\\MIDI\\ANTHEMS\\CANADA.MID" );
-
- // Open the MIDI file
- m_midi->SetStrProperty("Command", "Open");
-
- // Rewind the MIDI file
- m_midi->SetStrProperty("Command", "Prev");
-
-
- // Play the MIDI file
- m_midi->SetStrProperty("Command", "Play");
-
-
- ////////////////////
- // MY CODE ENDS HERE
- ////////////////////
-
-
-
- }
-
- void CFlagsView::OnClickCommand3dMexico(UINT, int, CWnd*, LPVOID)
- {
- // TODO: Add your VBX event notification handler code here
-
- //////////////////////
- // MY CODE STARTS HERE
- //////////////////////
-
- // Close the MIDI device
- m_midi->SetStrProperty("Command", "Close");
-
-
- // Set the name of the MIDI file
- m_midi->SetStrProperty("FileName",
- "\\VCPROG\\MIDI\\ANTHEMS\\MEXICO.MID" );
-
- // Open the MIDI file
- m_midi->SetStrProperty("Command", "Open");
-
- // Rewind the MIDI file
- m_midi->SetStrProperty("Command", "Prev");
-
-
- // Play the MIDI file
- m_midi->SetStrProperty("Command", "Play");
-
-
- ////////////////////
- // MY CODE ENDS HERE
- ////////////////////
-
-
- }
-
- void CFlagsView::OnClickCommand3dNetherlands(UINT, int, CWnd*, LPVOID)
- {
- // TODO: Add your VBX event notification handler code here
-
- //////////////////////
- // MY CODE STARTS HERE
- //////////////////////
-
- // Close the MIDI device
- m_midi->SetStrProperty("Command", "Close");
-
-
- // Set the name of the MIDI file
- m_midi->SetStrProperty("FileName",
- "\\VCPROG\\MIDI\\ANTHEMS\\NETHERLA.MID" );
-
- // Open the MIDI file
- m_midi->SetStrProperty("Command", "Open");
-
- // Rewind the MIDI file
- m_midi->SetStrProperty("Command", "Prev");
-
-
- // Play the MIDI file
- m_midi->SetStrProperty("Command", "Play");
-
-
- ////////////////////
- // MY CODE ENDS HERE
- ////////////////////
-
- }
-
- void CFlagsView::OnClickCommand3dChina(UINT, int, CWnd*, LPVOID)
- {
- // TODO: Add your VBX event notification handler code here
-
- //////////////////////
- // MY CODE STARTS HERE
- //////////////////////
-
- // Close the MIDI device
- m_midi->SetStrProperty("Command", "Close");
-
-
- // Set the name of the MIDI file
- m_midi->SetStrProperty("FileName",
- "\\VCPROG\\MIDI\\ANTHEMS\\CHINA.MID" );
-
- // Open the MIDI file
- m_midi->SetStrProperty("Command", "Open");
-
- // Rewind the MIDI file
- m_midi->SetStrProperty("Command", "Prev");
-
-
- // Play the MIDI file
- m_midi->SetStrProperty("Command", "Play");
-
-
- ////////////////////
- // MY CODE ENDS HERE
- ////////////////////
-
- }
-