Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
text.h
Package: Text.zip [view]
Upload User: aya088
Upload Date: 2021-10-23
Package Size: 42k
Code Size: 3k
Category:
DirextX
Development Platform:
Visual C++
- //------------------------------------------------------------------------------
- // File: Text.h
- //
- // Desc: DirectShow sample code - header file for VMR Text sample
- //
- // Copyright (c) Microsoft Corporation. All rights reserved.
- //------------------------------------------------------------------------------
- // VMR9 Headers
- #include <d3d9.h>
- #include <vmr9.h>
- //
- // Function prototypes
- //
- HRESULT InitPlayerWindow(void);
- HRESULT InitVideoWindow(int nMultiplier, int nDivider);
- HRESULT HandleGraphEvent(void);
- BOOL GetClipFileName(LPTSTR szName);
- BOOL CheckVideoVisibility(void);
- void MoveVideoWindow(void);
- void CloseInterfaces(void);
- void OpenClip(void);
- void CloseClip(void);
- void GetFilename(TCHAR *pszFull, TCHAR *pszFile);
- void Msg(TCHAR *szFormat, ...);
- HRESULT BlendApplicationImage(HWND hwndApp);
- HRESULT InitializeWindowlessVMR(IBaseFilter **ppVmr9);
- void OnPaint(HWND hwnd);
- HRESULT AddGraphToRot(IUnknown *pUnkGraph, DWORD *pdwRegister);
- void RemoveGraphFromRot(DWORD pdwRegister);
- //
- // Constants
- //
- // File filter for OpenFile dialog
- #define FILE_FILTER_TEXT
- TEXT("Video Files (*.asf; *.avi; *.qt; *.mov; *.mpg; *.mpeg; *.m1v; *.wmv)*.asf; *.avi; *.qt; *.mov; *.mpg; *.mpeg; *.m1v; *.wmv")
- // Begin default media search at root directory
- #define DEFAULT_MEDIA_PATH TEXT("\")
- // Defaults used with audio-only files
- #define DEFAULT_PLAYER_WIDTH 240
- #define DEFAULT_PLAYER_HEIGHT 120
- #define DEFAULT_VIDEO_WIDTH 320
- #define DEFAULT_VIDEO_HEIGHT 240
- #define MINIMUM_VIDEO_WIDTH 200
- #define MINIMUM_VIDEO_HEIGHT 120
- #define APPLICATIONNAME TEXT("VMR9 Text")
- #define CLASSNAME TEXT("VMR9Text")
- #define WM_GRAPHNOTIFY WM_USER+13
- //
- // Global data
- //
- extern HWND ghApp;
- extern HMENU ghMenu;
- extern HINSTANCE ghInst;
- extern TCHAR g_szFileName[MAX_PATH];
- extern DWORD g_dwGraphRegister;
- // DirectShow interfaces
- extern IGraphBuilder *pGB;
- extern IMediaControl *pMC;
- extern IVMRWindowlessControl9 *pWC;
- extern IMediaControl *pMC;
- extern IMediaEventEx *pME;
- extern IMediaSeeking *pMS;
- //
- // Macros
- //
- #define SAFE_RELEASE(x) { if (x) x->Release(); x = NULL; }
- #define JIF(x) if (FAILED(hr=(x)))
- {Msg(TEXT("FAILED(hr=0x%x) in ") TEXT(#x) TEXT("n"), hr); return hr;}
- #define LIF(x) if (FAILED(hr=(x)))
- {Msg(TEXT("FAILED(hr=0x%x) in ") TEXT(#x) TEXT("n"), hr);}
- //
- // Resource constants
- //
- #define IDC_STATIC -1
- #define IDI_TEXT 100
- #define IDR_MENU 101
- #define IDD_HELP_ABOUT 200
- #define ID_FILE_OPENCLIP 301
- #define ID_FILE_EXIT 302
- #define ID_FILE_CLOSE 303
- #define ID_FILE_INITCLIP 304
- #define ID_SET_FONT 310
- #define ID_HELP_ABOUT 320