00001
00002
00003
00004 #include "stdafx.h"
00005 #include "TransClient.h"
00006
00007 #include "MainFrm.h"
00008 #include "TransClientDoc.h"
00009 #include "TransClientView.h"
00010 #include "Client.h"
00011
00012 #ifdef _DEBUG
00013 #define new DEBUG_NEW
00014 #undef THIS_FILE
00015 static char THIS_FILE[] = __FILE__;
00016 #endif
00017
00019
00020
00021 BEGIN_MESSAGE_MAP(CTransClientApp, CWinApp)
00022
00023 ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00024
00025
00026
00027
00028 ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
00029 ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
00030
00031 ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup)
00032 END_MESSAGE_MAP()
00033
00035
00036
00037 CTransClientApp::CTransClientApp()
00038 {
00039
00040
00041 }
00042
00044
00045
00046 CTransClientApp theApp;
00047 FILE* video;
00048 HWND pPlayer;
00049 char ServerAddress[20];
00050 CClient m_client;
00051 bool VideoIsRequested;
00052
00054
00055
00056 BOOL CTransClientApp::InitInstance()
00057 {
00058 AfxEnableControlContainer();
00059
00060
00061
00062
00063
00064
00065 #ifdef _AFXDLL
00066 Enable3dControls();
00067 #else
00068 Enable3dControlsStatic();
00069 #endif
00070
00071
00072
00073
00074 SetRegistryKey(_T("Local AppWizard-Generated Applications"));
00075
00076 LoadStdProfileSettings();
00077
00078
00079
00080
00081 CSingleDocTemplate* pDocTemplate;
00082 pDocTemplate = new CSingleDocTemplate(
00083 IDR_MAINFRAME,
00084 RUNTIME_CLASS(CTransClientDoc),
00085 RUNTIME_CLASS(CMainFrame),
00086 RUNTIME_CLASS(CTransClientView));
00087 AddDocTemplate(pDocTemplate);
00088
00089
00090 CCommandLineInfo cmdInfo;
00091 ParseCommandLine(cmdInfo);
00092
00093
00094 if (!ProcessShellCommand(cmdInfo))
00095 return FALSE;
00096
00097
00098 m_pMainWnd->ShowWindow(SW_SHOW);
00099 m_pMainWnd->UpdateWindow();
00100
00101 (AfxGetMainWnd( ))->SetWindowText("Video Transcoding Client");
00102 return TRUE;
00103 }
00104
00105
00107
00108
00109 class CAboutDlg : public CDialog
00110 {
00111 public:
00112 CAboutDlg();
00113
00114
00115
00116 enum { IDD = IDD_ABOUTBOX };
00117
00118
00119
00120
00121 protected:
00122 virtual void DoDataExchange(CDataExchange* pDX);
00123
00124
00125
00126 protected:
00127
00128
00129
00130 DECLARE_MESSAGE_MAP()
00131 };
00132
00133 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00134 {
00135
00136
00137 }
00138
00139 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00140 {
00141 CDialog::DoDataExchange(pDX);
00142
00143
00144 }
00145
00146 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00147
00148
00149
00150 END_MESSAGE_MAP()
00151
00152
00153 void CTransClientApp::OnAppAbout()
00154 {
00155 CAboutDlg aboutDlg;
00156 aboutDlg.DoModal();
00157 }
00158
00160
00161