bitmap.h
资源名称:Text.zip [点击查看]
上传用户:aya088
上传日期:2021-10-23
资源大小:42k
文件大小:2k
源码类别:
DirextX编程
开发平台:
Visual C++
- //------------------------------------------------------------------------------
- // File: Bitmap.h
- //
- // Desc: DirectShow sample code - header file for VMR bitmap manipulation
- //
- // Copyright (c) Microsoft Corporation. All rights reserved.
- //------------------------------------------------------------------------------
- //
- // Constants
- //
- #define TRANSPARENCY_VALUE (0.5f)
- #define PURE_WHITE RGB(255,255,255)
- #define ALMOST_WHITE RGB(250,250,250)
- #define BLEND_TEXT TEXT("This is a demonstration of alpha-blended dynamic text. ")
- #define DYNAMIC_TEXT_SIZE 255
- #define DEFAULT_FONT_NAME TEXT("Impact ")
- #define DEFAULT_FONT_STYLE TEXT("Regular ")
- #define DEFAULT_FONT_SIZE 12
- #define DEFAULT_FONT_COLOR RGB(255,0,0)
- #define MAX_FONT_SIZE 25
- #define STR_VMR_DISPLAY_WARNING
- TEXT("The VMR9 requires Direct3D9 in order to perform alpha blending. ")
- TEXT("Therefore, this sample requires that your display be set to a mode ")
- TEXT("which is compatible with your computer's video card. ")
- TEXT("Most video cards support Direct3D in 16-bit and 32-bit RGB modes, ")
- TEXT("and some newer cards support 16, 24 and 32-bit display modes.rnrn")
- TEXT("To correct this problem, try changing your display to use ")
- TEXT("16-bit or 32-bit color depth in the Display Control Panel applet. ")
- //
- // Function prototypes
- //
- HRESULT BlendText(HWND hwndApp, TCHAR *szNewText);
- HFONT UserSelectFont(void);
- HFONT SetTextFont(BOOL bShowDialog);
- void SetColorRef(VMR9AlphaBitmap& bmpInfo);
- void UpdateText(void);
- void StartTimer(void);
- void StopTimer(void);
- VOID CALLBACK TimerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime);
- //
- // Global data
- //
- extern IVMRMixerBitmap9 *pBMP;
- extern HFONT g_hFont;
- extern TCHAR g_szAppText[DYNAMIC_TEXT_SIZE];
English
