• (4 Pages)
  • +
  • « First
  • 2
  • 3
  • 4

Win32 WebCam Program Displays a Webcam Picture, Saves it as a .bmp file Rate Topic: ***** 4 Votes

#46 snoopy11  Icon User is offline

  • Engineering ● Software
  • member icon

Reputation: 768
  • View blog
  • Posts: 2,234
  • Joined: 20-March 10

Posted 12 February 2013 - 05:35 AM

Post your code,

Im not a mind reader...

Snoopy.
Was This Post Helpful? 0
  • +
  • -

#47 jimblumberg  Icon User is offline

  • member icon


Reputation: 4002
  • View blog
  • Posts: 12,347
  • Joined: 25-December 09

Posted 12 February 2013 - 10:13 AM

But please post the question in the proper help forum and provide a link to this tutorial in that post.

Jim
Was This Post Helpful? 0
  • +
  • -

#48 gopalcnepal  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 04-March 13

Posted 04 March 2013 - 02:46 AM

great work thanks.....
Was This Post Helpful? 0
  • +
  • -

#49 gopalcnepal  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 04-March 13

Posted 19 March 2013 - 08:56 PM

Hi thanks there.....I am using this program but wanted to make it take photo automatically. After I could do so I found out that it ask to select the webcam to be used in pop up window. I don't want that pop up window but cannot remove it. So please help. I am using Code::Blocks v12.11.
Was This Post Helpful? 0
  • +
  • -

#50 Izzaty  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 04-June 14

Posted 04 June 2014 - 08:34 AM

Hi,

Thanks for the code. I've tried this and I got this error. Can you help me with this?

1>------ Build started: Project: camera2, Configuration: Debug Win32 ------
1> main.cpp
1>c:\program files (x86)\windows kits\8.0\include\um\vfw.h(3312): warning C4005: 'WM_CAP_START' : macro redefinition
1> c:\tutorial\camera2\camera2\main.cpp(5) : see previous definition of 'WM_CAP_START'
1>c:\program files (x86)\windows kits\8.0\include\um\vfw.h(3339): warning C4005: 'WM_CAP_DRIVER_CONNECT' : macro redefinition
1> c:\tutorial\camera2\camera2\main.cpp(6) : see previous definition of 'WM_CAP_DRIVER_CONNECT'
1>c:\program files (x86)\windows kits\8.0\include\um\vfw.h(3340): warning C4005: 'WM_CAP_DRIVER_DISCONNECT' : macro redefinition
1> c:\tutorial\camera2\camera2\main.cpp(7) : see previous definition of 'WM_CAP_DRIVER_DISCONNECT'
1>c:\program files (x86)\windows kits\8.0\include\um\vfw.h(3380): warning C4005: 'WM_CAP_EDIT_COPY' : macro redefinition
1> c:\tutorial\camera2\camera2\main.cpp(8) : see previous definition of 'WM_CAP_EDIT_COPY'
1>c:\program files (x86)\windows kits\8.0\include\um\vfw.h(3386): warning C4005: 'WM_CAP_DLG_VIDEOSOURCE' : macro redefinition
1> c:\tutorial\camera2\camera2\main.cpp(13) : see previous definition of 'WM_CAP_DLG_VIDEOSOURCE'
1>c:\program files (x86)\windows kits\8.0\include\um\vfw.h(3392): warning C4005: 'WM_CAP_SET_PREVIEW' : macro redefinition
1> c:\tutorial\camera2\camera2\main.cpp(12) : see previous definition of 'WM_CAP_SET_PREVIEW'
1>c:\program files (x86)\windows kits\8.0\include\um\vfw.h(3394): warning C4005: 'WM_CAP_SET_PREVIEWRATE' : macro redefinition
1> c:\tutorial\camera2\camera2\main.cpp(11) : see previous definition of 'WM_CAP_SET_PREVIEWRATE'
1>c:\program files (x86)\windows kits\8.0\include\um\vfw.h(3395): warning C4005: 'WM_CAP_SET_SCALE' : macro redefinition
1> c:\tutorial\camera2\camera2\main.cpp(10) : see previous definition of 'WM_CAP_SET_SCALE'
1>c:\program files (x86)\windows kits\8.0\include\um\vfw.h(3399): warning C4005: 'WM_CAP_GRAB_FRAME' : macro redefinition
1> c:\tutorial\camera2\camera2\main.cpp(9) : see previous definition of 'WM_CAP_GRAB_FRAME'
1>c:\tutorial\camera2\camera2\main.cpp(29): error C2440: 'initializing' : cannot convert from 'const wchar_t [7]' to 'char []'
1> There is no context in which this conversion is possible
1>c:\tutorial\camera2\camera2\main.cpp(55): error C2440: '=' : cannot convert from 'char []' to 'LPCWSTR'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>c:\tutorial\camera2\camera2\main.cpp(60): error C2664: 'CreateWindowExW' : cannot convert parameter 2 from 'char []' to 'LPCWSTR'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>c:\tutorial\camera2\camera2\main.cpp(96): error C2664: 'CreateWindowExW' : cannot convert parameter 2 from 'const char [7]' to 'LPCWSTR'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>c:\tutorial\camera2\camera2\main.cpp(98): error C2664: 'CreateWindowExW' : cannot convert parameter 2 from 'const char [7]' to 'LPCWSTR'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>c:\tutorial\camera2\camera2\main.cpp(100): error C2664: 'CreateWindowExW' : cannot convert parameter 2 from 'const char [7]' to 'LPCWSTR'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>c:\tutorial\camera2\camera2\main.cpp(102): error C2664: 'capCreateCaptureWindowW' : cannot convert parameter 1 from 'const char [14]' to 'LPCWSTR'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>c:\tutorial\camera2\camera2\main.cpp(153): error C2664: 'CreateBMPFile' : cannot convert parameter 2 from 'const char [10]' to 'LPTSTR'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>c:\tutorial\camera2\camera2\main.cpp(194): error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [12]' to 'LPCWSTR'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>c:\tutorial\camera2\camera2\main.cpp(200): error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [10]' to 'LPCWSTR'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>c:\tutorial\camera2\camera2\main.cpp(206): error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [11]' to 'LPCWSTR'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>c:\tutorial\camera2\camera2\main.cpp(219): error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [16]' to 'LPCWSTR'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>c:\tutorial\camera2\camera2\main.cpp(224): error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [16]' to 'LPCWSTR'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>c:\tutorial\camera2\camera2\main.cpp(231): error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [10]' to 'LPCWSTR'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>c:\tutorial\camera2\camera2\main.cpp(236): error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [12]' to 'LPCWSTR'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>c:\tutorial\camera2\camera2\main.cpp(251): error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [10]' to 'LPCWSTR'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


I'm using Visual Studio 2012, I've create a project using Win32.
Thank you in advance.
Was This Post Helpful? 0
  • +
  • -

#51 snoopy11  Icon User is offline

  • Engineering ● Software
  • member icon

Reputation: 768
  • View blog
  • Posts: 2,234
  • Joined: 20-March 10

Posted 04 June 2014 - 09:43 AM

Yes,

You need to read the Tutorial properly it tells you if you are using MS Visual Studio you dont need the #defines it also tells you that you need to set your project's Character Set to Multi-Byte. As this is not a Unicode build.

Project Properties-> Configuration Properties-> General -> Character Set.

Also because this Tutorial uses VFW (Video For Windows), It might not work on your modern computer. It might but might not. VFW was an old XP api.It was deprecated in Vista. The most modern api is now WMF (Windows Media Foundation).

Luckily enough I have released a version of this program in another Tutorial which can be found here.

http://www.dreaminco...-c-for-windows/



Regards

Snoopy.
Was This Post Helpful? 1
  • +
  • -

#52 Izzaty  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 04-June 14

Posted 05 June 2014 - 02:07 AM

View Postsnoopy11, on 04 June 2014 - 09:43 AM, said:

Yes,

You need to read the Tutorial properly it tells you if you are using MS Visual Studio you dont need the #defines it also tells you that you need to set your project's Character Set to Multi-Byte. As this is not a Unicode build.

Project Properties-> Configuration Properties-> General -> Character Set.

Also because this Tutorial uses VFW (Video For Windows), It might not work on your modern computer. It might but might not. VFW was an old XP api.It was deprecated in Vista. The most modern api is now WMF (Windows Media Foundation).

Luckily enough I have released a version of this program in another Tutorial which can be found here.

http://www.dreaminco...-c-for-windows/



Regards

Snoopy.



Thank you for your respond. I will try this again. Thanks. :D
Was This Post Helpful? 0
  • +
  • -

  • (4 Pages)
  • +
  • « First
  • 2
  • 3
  • 4