/****************************************************************************** |* THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF |* ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO |* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A |* PARTICULAR PURPOSE. |* |* Copyright 1995-2005 Nero AG. All Rights Reserved. |*----------------------------------------------------------------------------- |* NeroSDK / NVAPIExample |* |* PROGRAM: PageFirst.h |* |* PURPOSE: Implementation of the first page. ******************************************************************************/ #ifndef _NVAPIEXAMPLE_PAGE_FIRST_H_ #define _NVAPIEXAMPLE_PAGE_FIRST_H_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #include "Page.h" #include "PageData.h" ///////////////////////////////////////////////////////////////////////////// // CPageFirst dialog class CPageFirst : public CPage , CNVAPIExamplePage { protected: // The tree items on the first level can be of the CONTENTTYPE type. // enum CONTENTTYPE { VIDEOTITLE = 0, SLIDESHOW, }; // The tree items on the second level of a SLIDESHOW can be of the // AUDIOTYPE type. IMAGEPATH means an image path. T_NONE means no // transition. // enum SUBITEMTYPE { ST_VIDEOPATH = -5, ST_AUDIOPATH = -4, ST_IMAGEPATH = -3, ST_VIDEOSTREAM = -2, ST_AUDIOSTREAM = -1, ST_NONEEFFECT = 0, ST_EFFECT, }; // These two ints hold the sequence numbers for newly inserted video // and slideshow items. They are used for automatic unique naming of // new items. // int m_iVideoItemSequence; int m_iSlideshowItemSequence; int m_iVideoStreamSequence; CImageList m_ilIcons; bool m_bLoadAndBurn; // Construction public: CPageFirst(CSheet * pParentSheet); // Dialog Data //{{AFX_DATA(CPageFirst) enum { IDD = IDD_FIRST_PAGE }; CButton c_InsertAudioStream; CButton c_InsertVideoStream; CComboBox c_EncodingType; CButton c_RemoveAll; CButton c_Export; CButton c_Preview; CButton c_InsertAudio; CButton c_Save; CButton c_Remove; CComboBox c_ProjectType; CButton c_Load; CButton c_InsertVideo; CButton c_InsertSlide; CButton c_InsertImage; CComboBox c_TransitionType; CTreeCtrl c_Content; int m_iProjectType; int m_iEncodingType; //}}AFX_DATA // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CPageFirst) protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support //}}AFX_VIRTUAL // Implementation protected: // Generated message map functions //{{AFX_MSG(CPageFirst) virtual BOOL OnInitDialog(); afx_msg void OnLoad(); afx_msg void OnSave(); afx_msg void OnInsertVideo(); afx_msg void OnRemove(); afx_msg void OnInsertSlide(); afx_msg void OnSelchangedContent(NMHDR* pNMHDR, LRESULT* pResult); afx_msg void OnSelchangeTransitionType(); afx_msg void OnInsertImage(); afx_msg void OnBeginlabeleditContent(NMHDR* pNMHDR, LRESULT* pResult); afx_msg void OnInsertAudio(); afx_msg void OnLoadAndBurn(); afx_msg void OnDestroy(); afx_msg void OnPreview(); afx_msg void OnExport(); afx_msg void OnRemoveall(); afx_msg void OnInsertVideoStream(); afx_msg void OnInsertAudioStream(); //}}AFX_MSG DECLARE_MESSAGE_MAP() afx_msg LRESULT OnQuitWithDelay (WPARAM wParam, LPARAM lParam); void ChangeTransition (HTREEITEM hItem, const int transitionIndex); void UpdateControls (void); IXMLDOMDocumentPtr BuildXML (void); void ParseXMLDocument (const IXMLDOMDocumentPtr pDocument); void ParseNeroVisionProject (const IXMLDOMElementPtr pProject); void ParseSubproject (const IXMLDOMElementPtr pSubProject); void ParseContent (const IXMLDOMElementPtr pContent); void ParseVideotitle (const IXMLDOMElementPtr pVideotitle); void ParseSlideshow (const IXMLDOMElementPtr pSlideshow); HTREEITEM InsertVideo (LPCSTR psVideoItemName, LPCSTR psPath); void InsertAudio (HTREEITEM hVideoItem, LPCSTR psAudioPath); HTREEITEM InsertSlideshow (LPCSTR psSlideshowName); void InsertTransition (HTREEITEM hSlideItem, const int transitionIndex = ST_NONEEFFECT); void InsertImage (HTREEITEM hSlideItem, LPCSTR psImagePath); HTREEITEM InsertVideoStream (LPCSTR psVideoStreamName, LPCSTR psVideoStreamContent); void InsertAudioStream (HTREEITEM hVideoItem, LPCSTR psAudioStreamName); _bstr_t PrettyFormatXML (/*[in]*/ BSTR bstrInputXML); bool IsTransition (const int transition) const { return transition >= 0; } bool IsAudioStream(LPCSTR psAudioPath); bool IsVideoStream(LPCSTR psVideoPath); // CPage implementation public: bool Create (void); bool OnNext (void); void OnChangeState (bool bActivate, bool bForward); }; //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif