capture window status |
status menu |
使用capGetStatus函數取得視訊狀態,capGetStatus(hwndVideo,&CapStatus,sizeof(CapStatus)),
-----------------------------------------------------------
CAPSTATUS structure:
typedef struct {
UINT uiImageWidth;
UINT uiImageHeight;
BOOL fLiveWindow;
BOOL fOverlayWindow;
BOOL fScale;
POINT ptScroll;
BOOL fUsingDefaultPalette;
BOOL fAudioHardware;
BOOL fCapFileExists;
DWORD dwCurrentVideoFrame;
DWORD dwCurrentVideoFramesDropped;
DWORD dwCurrentWaveSamples;
DWORD dwCurrentTimeElapsedMS;
HPALETTE hPalCurrent;
BOOL fCapturingNow;
DWORD dwReturn;
UINT wNumVideoAllocated;
UINT wNumAudioAllocated;
} CAPSTATUS;
-------------------------------------------------
其中ptScroll必須抓取X及Y點,
CapStatus.ptScroll.x & CapStatus.ptScroll.y
這次是必須自己寫出程式碼的作業,但大至上跟上次的差不多,只需要注意抓到的數值是什麼型態,在加以顯示出來。
沒有留言:
張貼留言