bitmap.h
Upload User: aya088
Upload Date: 2021-10-23
Package Size: 42k
Code Size: 2k
Category:

DirextX

Development Platform:

Visual C++

  1. //------------------------------------------------------------------------------
  2. // File: Bitmap.h
  3. //
  4. // Desc: DirectShow sample code - header file for VMR bitmap manipulation
  5. //
  6. // Copyright (c) Microsoft Corporation.  All rights reserved.
  7. //------------------------------------------------------------------------------
  8. //
  9. // Constants
  10. //
  11. #define TRANSPARENCY_VALUE   (0.5f)
  12. #define PURE_WHITE          RGB(255,255,255)
  13. #define ALMOST_WHITE        RGB(250,250,250)
  14. #define BLEND_TEXT          TEXT("This is a demonstration of alpha-blended dynamic text.")
  15. #define DYNAMIC_TEXT_SIZE   255
  16. #define DEFAULT_FONT_NAME   TEXT("Impact")
  17. #define DEFAULT_FONT_STYLE  TEXT("Regular")
  18. #define DEFAULT_FONT_SIZE   12
  19. #define DEFAULT_FONT_COLOR  RGB(255,0,0)
  20. #define MAX_FONT_SIZE 25
  21. #define STR_VMR_DISPLAY_WARNING  
  22.     TEXT("The VMR9 requires Direct3D9 in order to perform alpha blending.  ") 
  23.     TEXT("Therefore, this sample requires that your display be set to a mode ") 
  24.     TEXT("which is compatible with your computer's video card.  ") 
  25.     TEXT("Most video cards support Direct3D in 16-bit and 32-bit RGB modes, ") 
  26.     TEXT("and some newer cards support 16, 24 and 32-bit display modes.rnrn") 
  27.     TEXT("To correct this problem, try changing your display to use ") 
  28.     TEXT("16-bit or 32-bit color depth in the Display Control Panel applet.")
  29. //
  30. // Function prototypes
  31. //
  32. HRESULT BlendText(HWND hwndApp, TCHAR *szNewText);
  33. HFONT UserSelectFont(void);
  34. HFONT SetTextFont(BOOL bShowDialog);
  35. void SetColorRef(VMR9AlphaBitmap& bmpInfo);
  36. void UpdateText(void);
  37. void StartTimer(void);
  38. void StopTimer(void);
  39. VOID CALLBACK TimerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime);
  40. //
  41. // Global data
  42. //
  43. extern IVMRMixerBitmap9 *pBMP;
  44. extern HFONT g_hFont;
  45. extern TCHAR g_szAppText[DYNAMIC_TEXT_SIZE];