CAVICapWnd
v1.19
Welcome to CAVICapWnd, A freeware MFC class to encapsulate the Video For Windows
API.
Features
CAVICapWnd provides a familiar MFC interface to the VFW API's. The class
derives from CWnd and translates the message based VFW API into standard C++ methods.
To see the class in action examine the source code of the VidCap project which produces
a complete sample application for the class.
Copyright
- You are allowed to include the source code in any product (commercial, shareware,
freeware or otherwise) when your product is released in binary form.
- You are allowed to modify the source code in any way you want except you
cannot modify the copyright details at the top of each module.
- If you want to distribute source code with your application, then you are
only allowed to distribute versions released by the author. This is to maintain
a single distribution point for the source code.
Usage
- To use CAVICapWnd in your project simply include VFWWnd.cpp from the test
application in your application and #include "VFWWnd.h" in whichever
files you want to use the class in. Then simply create an instance of the capture
window using the Create method (See CVidCapView::OnFileConnect in VidCapView.cpp).
Then call the public methods of CAVICapWnd as you desire.
- Included is a simple MFC SDI doc/view application which implements the same
functionality as the SDK example VidCap32.
- As of v1.14 the class is now designed for VC 2017 or later. It will not
compile on earlier releases of VC.
History
v1.19 (6 June 2022)
- Updated the code to use C++ uniform initialization for all variable
declarations
- Updated copyright details.
v1.18 (4 April 2020)
- Updated copyright details.
- Fixed more Clang-Tidy static code analysis warnings in the code.
v1.17 (26 December 2019)
- Fixed various Clang-Tidy static code analysis warnings in the code.
- Updated initialization of various structs to use C++ 11 list
initialization
v1.16 (25 September 2019)
- Fixed a number of compiler warnings when the code is compiled with VS
2019 Preview
v1.15 (3 June 2019)
- Updated copyright details.
- Updated the code to clean compile on VC 2019
v1.14 (28 December 2018)
- Updated copyright details
- Fixed a number of C++ core guidelines compiler warnings. These changes
mean that the code will now only compile on VC 2017 or later.
v1.13 (8 January 2016)
- Updated copyright details
- Updated the code to compile cleanly in VC 2008 - VC 2015.
- Fixed a bug in CAVICapWnd::GetVersion where it was using the message WM_CAP_DRIVER_GET_NAME
instead of WM_CAP_DRIVER_GET_VERSION
- Added SAL annotations to all the code
v1.12 (29 December 2008)
- Updated copyright details
- Removed VC 6 style AppWizard comments from the code.
- Updated code to compile correctly using _ATL_CSTRING_EXPLICIT_CONSTRUCTORS
define
- Code now compiles cleanly using Code Analysis (/analyze)
- The code now only supports VC 2005 or later.
- Fixed a bug in the ManualCreatePalette method where the wrong windows message
was being used.
- Various functions now take a LPCTSTR instead of a const CString& parameter.
- Code now supports the WM_CAP_GET_MCI_DEVICE message
- SetScroll method now takes a LPPOINT parameter
- Fixed a bug in GetDescription where the description parameter was not being
passed by reference.
v1.11 (19 December 2006)
- Updated the copyright details
- Updated the sample app to clean compile on VC 2005
- Updated the documentation to use the same style as my web site.
- Code now uses newer C++ style casts instead of C style casts.
- Removed CAVICapWnd destructor as it was unused
- Fixed a bug in CAVICapWnd::SetUserData where the wrong message was being
used.
- Reviewed all TRACE statements for correctness.
- Addition of a AVICAPWND_EXT_CLASS preprocessor macro to allow the class
to be more easily added to an extension DLL.
v1.1 (16 October 2000)
- The following values have been made persistent
a) The name of the capture
file
b) The capture frame rate
c) Whether audio should be captured
d) The limit capture option
e) The time limit option
f) The capture width,
height and bit depth
g) The stretch option
h) The VFW device last connected
to
i) The audio settings
j) The overlay and preview state
- Default name of the capture file is now set to be in the same directory
as where the VidCap exe is located
- The program auto connects if there is only one device
- Stretching the image to the client area is now supported
- User is now prompted to hit ok when starting to capture video
- Sample app now handles palette messages correctly
- The program brings up the connection dialog initially if there is multiple
devices installed.
v1.0 (11 October 2000)
Contacting the Author
PJ Naughter
Email: pjna@naughter.com
Web: http://www.naughter.com
6 June
2022