52 lines
1.3 KiB
Markdown
52 lines
1.3 KiB
Markdown
---
|
|
page_type: sample
|
|
languages:
|
|
- cpp
|
|
products:
|
|
- windows-api-win32
|
|
name: MFCaptureToFile sample
|
|
urlFragment: mfcapturetofile
|
|
extendedZipContent:
|
|
- path: LICENSE
|
|
target: LICENSE
|
|
description: This sample demonstrates how to capture video from camera to a file.
|
|
---
|
|
|
|
# MFCaptureToFile sample
|
|
|
|
Demonstrates how to capture video from camera to a file.
|
|
|
|
## Sample Language Implementations
|
|
|
|
C++
|
|
|
|
## Files
|
|
|
|
capture.cpp
|
|
capture.h
|
|
maindialog.cpp
|
|
maindialog.h
|
|
MFCaptureToFile.rc
|
|
MFCaptureToFile.sln
|
|
MFCaptureToFile.vcproj
|
|
readme.txt
|
|
resource.h
|
|
stdafx.h
|
|
winmain.cpp
|
|
|
|
## To build the sample using the command prompt
|
|
|
|
1. Open the Command Prompt window and navigate to the MFCaptureToFile directory.
|
|
2. Type msbuild MFCaptureToFile.sln.
|
|
|
|
## To build the sample using Visual Studio (preferred method)
|
|
|
|
1. Open Windows Explorer and navigate to the MFCaptureToFile directory.
|
|
2. Double-click the icon for the MFCaptureToFile.sln file to open the file in Visual Studio.
|
|
3. In the Build menu, select Build Solution. The application will be built in the default \Debug or \Release directory.
|
|
|
|
## To run the sample
|
|
|
|
1. Navigate to the directory that contains the new executable using the command prompt or Windows Explorer.
|
|
2. Type MFCaptureToFile.exe at the command line, or double-click the icon for MFCaptureToFile.exe to launch it from Windows Explorer.
|