亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? winutil.h

?? 用DirectX制作高級動畫-[Advanced.Animation.with.DirectX]
?? H
?? 第 1 頁 / 共 2 頁
字號:
//------------------------------------------------------------------------------
// File: WinUtil.h
//
// Desc: DirectShow base classes - defines generic handler classes.
//
// Copyright (c) 1992-2002 Microsoft Corporation.  All rights reserved.
//------------------------------------------------------------------------------


// Make sure that you call PrepareWindow to initialise the window after
// the object has been constructed. It is a separate method so that
// derived classes can override useful methods like MessageLoop. Also
// any derived class must call DoneWithWindow in its destructor. If it
// doesn't a message may be retrieved and call a derived class member
// function while a thread is executing the base class destructor code

#ifndef __WINUTIL__
#define __WINUTIL__

const int DEFWIDTH = 320;                    // Initial window width
const int DEFHEIGHT = 240;                   // Initial window height
const int CAPTION = 256;                     // Maximum length of caption
const int TIMELENGTH = 50;                   // Maximum length of times
const int PROFILESTR = 128;                  // Normal profile string
const WORD PALVERSION = 0x300;               // GDI palette version
const LONG PALETTE_VERSION = (LONG) 1;       // Initial palette version
const COLORREF VIDEO_COLOUR = 0;             // Defaults to black background
const HANDLE hMEMORY = (HANDLE) (-1);        // Says to open as memory file

#define WIDTH(x) ((*(x)).right - (*(x)).left)
#define HEIGHT(x) ((*(x)).bottom - (*(x)).top)
#define SHOWSTAGE TEXT("WM_SHOWSTAGE")
#define SHOWSTAGETOP TEXT("WM_SHOWSTAGETOP")
#define REALIZEPALETTE TEXT("WM_REALIZEPALETTE")

class AM_NOVTABLE CBaseWindow
{
protected:

    HINSTANCE m_hInstance;          // Global module instance handle
    HWND m_hwnd;                    // Handle for our window
    HDC m_hdc;                      // Device context for the window
    LONG m_Width;                   // Client window width
    LONG m_Height;                  // Client window height
    BOOL m_bActivated;              // Has the window been activated
    LPTSTR m_pClassName;            // Static string holding class name
    DWORD m_ClassStyles;            // Passed in to our constructor
    DWORD m_WindowStyles;           // Likewise the initial window styles
    DWORD m_WindowStylesEx;         // And the extended window styles
    UINT m_ShowStageMessage;        // Have the window shown with focus
    UINT m_ShowStageTop;            // Makes the window WS_EX_TOPMOST
    UINT m_RealizePalette;          // Makes us realize our new palette
    HDC m_MemoryDC;                 // Used for fast BitBlt operations
    HPALETTE m_hPalette;            // Handle to any palette we may have
    BYTE m_bNoRealize;              // Don't realize palette now
    BYTE m_bBackground;             // Should we realise in background
    BYTE m_bRealizing;              // already realizing the palette
    CCritSec m_WindowLock;          // Serialise window object access
    BOOL m_bDoGetDC;                // Should this window get a DC
    bool m_bDoPostToDestroy;        // Use PostMessage to destroy
    CCritSec m_PaletteLock;         // This lock protects m_hPalette.
                                    // It should be held anytime the
                                    // program use the value of m_hPalette.

    // Maps windows message procedure into C++ methods
    friend LRESULT CALLBACK WndProc(HWND hwnd,      // Window handle
                                    UINT uMsg,      // Message ID
                                    WPARAM wParam,  // First parameter
                                    LPARAM lParam); // Other parameter

    virtual LRESULT OnPaletteChange(HWND hwnd, UINT Message);

public:

    CBaseWindow(BOOL bDoGetDC = TRUE, bool bPostToDestroy = false);

#ifdef DEBUG
    virtual ~CBaseWindow();
#endif

    virtual HRESULT DoneWithWindow();
    virtual HRESULT PrepareWindow();
    virtual HRESULT InactivateWindow();
    virtual HRESULT ActivateWindow();
    virtual BOOL OnSize(LONG Width, LONG Height);
    virtual BOOL OnClose();
    virtual RECT GetDefaultRect();
    virtual HRESULT UninitialiseWindow();
    virtual HRESULT InitialiseWindow(HWND hwnd);

    HRESULT CompleteConnect();
    HRESULT DoCreateWindow();

    HRESULT PerformanceAlignWindow();
    HRESULT DoShowWindow(LONG ShowCmd);
    void PaintWindow(BOOL bErase);
    void DoSetWindowForeground(BOOL bFocus);
    virtual HRESULT SetPalette(HPALETTE hPalette);
    void SetRealize(BOOL bRealize)
    {
        m_bNoRealize = !bRealize;
    }

    //  Jump over to the window thread to set the current palette
    HRESULT SetPalette();
    void UnsetPalette(void);
    virtual HRESULT DoRealisePalette(BOOL bForceBackground = FALSE);

    void LockPaletteLock();
    void UnlockPaletteLock();

    virtual BOOL PossiblyEatMessage(UINT uMsg, WPARAM wParam, LPARAM lParam)
	    { return FALSE; };

    // Access our window information

    bool WindowExists();
    LONG GetWindowWidth();
    LONG GetWindowHeight();
    HWND GetWindowHWND();
    HDC GetMemoryHDC();
    HDC GetWindowHDC();

    #ifdef DEBUG
    HPALETTE GetPalette();
    #endif // DEBUG

    // This is the window procedure the derived object should override

    virtual LRESULT OnReceiveMessage(HWND hwnd,          // Window handle
                                     UINT uMsg,          // Message ID
                                     WPARAM wParam,      // First parameter
                                     LPARAM lParam);     // Other parameter

    // Must be overriden to return class and window styles

    virtual LPTSTR GetClassWindowStyles(
                            DWORD *pClassStyles,          // Class styles
                            DWORD *pWindowStyles,         // Window styles
                            DWORD *pWindowStylesEx) PURE; // Extended styles
};


// This helper class is entirely subservient to the owning CBaseWindow object
// All this object does is to split out the actual drawing operation from the
// main object (because it was becoming too large). We have a number of entry
// points to set things like the draw device contexts, to implement the actual
// drawing and to set the destination rectangle in the client window. We have
// no critical section locking in this class because we are used exclusively
// by the owning window object which looks after serialising calls into us

// If you want to use this class make sure you call NotifyAllocator once the
// allocate has been agreed, also call NotifyMediaType with a pointer to a
// NON stack based CMediaType once that has been set (we keep a pointer to
// the original rather than taking a copy). When the palette changes call
// IncrementPaletteVersion (easiest thing to do is to also call this method
// in the SetMediaType method most filters implement). Finally before you
// start rendering anything call SetDrawContext so that we can get the HDCs
// for drawing from the CBaseWindow object we are given during construction

class CDrawImage
{
protected:

    CBaseWindow *m_pBaseWindow;     // Owning video window object
    CRefTime m_StartSample;         // Start time for the current sample
    CRefTime m_EndSample;           // And likewise it's end sample time
    HDC m_hdc;                      // Main window device context
    HDC m_MemoryDC;                 // Offscreen draw device context
    RECT m_TargetRect;              // Target destination rectangle
    RECT m_SourceRect;              // Source image rectangle
    BOOL m_bStretch;                // Do we have to stretch the images
    BOOL m_bUsingImageAllocator;    // Are the samples shared DIBSECTIONs
    CMediaType *m_pMediaType;       // Pointer to the current format
    int m_perfidRenderTime;         // Time taken to render an image
    LONG m_PaletteVersion;          // Current palette version cookie

    // Draw the video images in the window

    void SlowRender(IMediaSample *pMediaSample);
    void FastRender(IMediaSample *pMediaSample);
    void DisplaySampleTimes(IMediaSample *pSample);
    void UpdateColourTable(HDC hdc,BITMAPINFOHEADER *pbmi);
    void SetStretchMode();

public:

    // Used to control the image drawing

    CDrawImage(CBaseWindow *pBaseWindow);
    BOOL DrawImage(IMediaSample *pMediaSample);
    BOOL DrawVideoImageHere(HDC hdc, IMediaSample *pMediaSample,
                            LPRECT lprcSrc, LPRECT lprcDst);
    void SetDrawContext();
    void SetTargetRect(RECT *pTargetRect);
    void SetSourceRect(RECT *pSourceRect);
    void GetTargetRect(RECT *pTargetRect);
    void GetSourceRect(RECT *pSourceRect);
    virtual RECT ScaleSourceRect(const RECT *pSource);

    // Handle updating palettes as they change

    LONG GetPaletteVersion();
    void ResetPaletteVersion();
    void IncrementPaletteVersion();

    // Tell us media types and allocator assignments

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产高清一区日本| 日韩和欧美一区二区| 成人精品小蝌蚪| 国产精品初高中害羞小美女文| 99久久综合精品| 亚洲乱码国产乱码精品精小说| 色猫猫国产区一区二在线视频| 一区二区三区四区在线免费观看 | 久久精品国产免费看久久精品| 欧美一区二区精品在线| 国内成人免费视频| 国产精品区一区二区三区| 色婷婷精品大在线视频| 首页亚洲欧美制服丝腿| 久久先锋影音av鲁色资源网| 成人av网站免费观看| 亚洲宅男天堂在线观看无病毒| 91精品国产综合久久国产大片 | 国产乱淫av一区二区三区| 国产精品无人区| 欧美做爰猛烈大尺度电影无法无天| 日精品一区二区三区| 久久精品男人天堂av| 91麻豆产精品久久久久久| 日本中文字幕一区二区视频 | 亚洲成人资源网| 日韩一二三区视频| 成人av电影在线| 视频在线观看91| 中文字幕 久热精品 视频在线| 精品视频免费在线| 国产.欧美.日韩| 肉色丝袜一区二区| 国产精品视频麻豆| 日韩一区二区三区电影| 91女人视频在线观看| 蜜桃视频免费观看一区| 亚洲日本欧美天堂| 精品国产第一区二区三区观看体验| 99国产精品一区| 九九国产精品视频| 亚洲综合在线第一页| 久久久五月婷婷| 4438x成人网最大色成网站| 成人app在线观看| 麻豆传媒一区二区三区| 亚洲一区二区精品视频| 国产精品私人影院| 久久综合色播五月| 欧美一级夜夜爽| 欧美午夜精品理论片a级按摩| 国产 欧美在线| 精品一区二区在线视频| 日韩高清不卡一区二区| 亚洲精品国久久99热| 日本一区二区三区免费乱视频| 欧美一区二区成人6969| 在线观看欧美黄色| 91丝袜美女网| 成人h版在线观看| 国产馆精品极品| 国产麻豆日韩欧美久久| 另类欧美日韩国产在线| 青青草97国产精品免费观看无弹窗版| 亚洲与欧洲av电影| 亚洲精品视频在线看| 国产精品福利影院| 国产精品久99| 国产精品国产自产拍高清av王其| 国产三级精品三级| 国产午夜久久久久| 国产欧美精品一区二区色综合 | 亚洲国产精品精华液ab| 久久综合色之久久综合| 2021国产精品久久精品| 欧美精品一区二区三区蜜桃| 精品日韩在线观看| 精品不卡在线视频| 久久久久久久久岛国免费| 久久新电视剧免费观看| 国产蜜臀av在线一区二区三区| 欧美国产97人人爽人人喊| 中文字幕乱码日本亚洲一区二区 | 精品久久久久av影院| 精品国产乱码久久久久久老虎 | 欧美一区在线视频| 日韩精品一区二区三区视频在线观看| 91精品国产欧美日韩| 欧美一区二区三区色| 精品国产一区二区国模嫣然| 精品99999| 国产精品欧美一区二区三区| 亚洲你懂的在线视频| 亚洲一区二区在线免费看| 亚洲mv在线观看| 精品影院一区二区久久久| 国产成人在线看| 欧洲另类一二三四区| 678五月天丁香亚洲综合网| 日韩精品中文字幕一区| 中文字幕不卡三区| 亚洲国产精品欧美一二99| 免费国产亚洲视频| 国产精品1区二区.| 在线观看成人免费视频| 日韩欧美一区二区三区在线| 国产女主播视频一区二区| 樱花草国产18久久久久| 奇米一区二区三区av| 国内精品视频666| 一本色道亚洲精品aⅴ| 日韩亚洲欧美成人一区| 欧美国产精品一区二区| 五月激情丁香一区二区三区| 国产裸体歌舞团一区二区| 色狠狠综合天天综合综合| 欧美tickle裸体挠脚心vk| 日韩一区在线播放| 久久精品国产一区二区三| 97精品视频在线观看自产线路二| 欧美高清性hdvideosex| 国产精品乱码妇女bbbb| 秋霞电影一区二区| 91在线视频播放| 精品久久久久av影院 | 欧美日韩三级在线| 国产亚洲精品福利| 视频一区欧美精品| 91蜜桃在线免费视频| 337p日本欧洲亚洲大胆精品| 亚洲精品视频自拍| 风流少妇一区二区| 精品精品欲导航| 亚洲国产另类精品专区| 成人教育av在线| 久久综合色天天久久综合图片| 风流少妇一区二区| 欧美精品18+| 亚洲主播在线观看| 99在线精品一区二区三区| 精品国产乱码久久久久久免费| 亚洲图片有声小说| 99国产精品久久久| 中文字幕精品三区| 国产精品伊人色| 91精品国产综合久久久蜜臀图片| 亚洲美腿欧美偷拍| 欧美大度的电影原声| 亚洲第四色夜色| 91麻豆国产香蕉久久精品| 国产精品美女久久久久久久网站| 美女mm1313爽爽久久久蜜臀| 欧美日韩国产一区二区三区地区| 日韩一区日韩二区| www.av精品| 亚洲天堂成人网| 不卡视频在线观看| 国产欧美精品区一区二区三区 | 成人黄色一级视频| 亚洲国产精品成人综合色在线婷婷 | 日韩一区二区免费在线观看| 亚洲一区二区不卡免费| 91久久精品一区二区三| 18欧美乱大交hd1984| av日韩在线网站| 国产精品久久久99| 99re8在线精品视频免费播放| 中文字幕中文在线不卡住| 不卡一区二区三区四区| 成人免费在线视频观看| 色婷婷av久久久久久久| 一片黄亚洲嫩模| 欧美日韩高清一区| 日韩国产在线观看一区| 欧美一区二区三区四区在线观看| 秋霞午夜鲁丝一区二区老狼| 欧美mv和日韩mv的网站| 国产一区二区三区免费播放| 国产欧美精品一区二区色综合| 成人丝袜高跟foot| 亚洲免费观看高清完整版在线观看熊| 91丨porny丨最新| 亚洲国产一区在线观看| 91精品国产综合久久久蜜臀粉嫩| 久草中文综合在线| 亚洲国产精品国自产拍av| 91麻豆自制传媒国产之光| 亚洲一区视频在线观看视频| 欧美一区二区高清| 国产电影一区在线| 综合欧美一区二区三区| 欧美日本国产一区| 国产在线精品一区二区三区不卡| 国产精品无遮挡| 欧美三级在线播放| 国精产品一区一区三区mba桃花| 天天爽夜夜爽夜夜爽精品视频| 日韩午夜电影av| 成人激情视频网站| 视频一区视频二区中文字幕|