• (3 Pages)
  • +
  • 1
  • 2
  • 3

Sound Recorder using the low level Windows API in C++ Recorder with wave visualisation Rate Topic: -----

#31 Brackets  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 13-June 16

Posted 13 June 2016 - 01:51 AM

Hi snoopy11.
First of all, I admire the cleanliness of your code.
However, your code doesn't work for me.
It creates a window, buttons, and a green line in it. It creates .wav file but it doesn't record anything to it. Every time it is just 1 second long, kind of chirking noise (I think it could be my PC's working sound). But it doesn't record anything from what I speak. It's always 16KB.
http://image.prntscr...cc36470227f.png
Also why is my program's name in chinese? xD
I'm using VS2010 Ultimate. Windows 7.
I'd appreciate if you helped.
Was This Post Helpful? 0
  • +
  • -

#32 Marcnic  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 24-June 16

Posted 24 June 2016 - 09:37 AM

Good afternoon,

I have just posted a question on your site. I don't find the libraries required to compile this very interesting project. So, could you help me by telling me where are WinMM.Lib , kernel32.lib , user32.lib and Comdlg32.lib ?

I have a Windows 7 PC and I try to compile with VisualStudio 2010 Express (french version).

Thank you very much if you can help me !

Marc
Was This Post Helpful? 0
  • +
  • -

#33 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 13400
  • View blog
  • Posts: 53,478
  • Joined: 12-June 08

Posted 24 June 2016 - 09:41 AM

Have you checked the windows/system32 folder?
Was This Post Helpful? 0
  • +
  • -

#34 CuriosCoder  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 18-September 16

Posted 18 September 2016 - 05:12 AM

Does this code run for windows 8?
It gave me errors on visual studio 2015.
Do I need to do some configurations for the code to run on my system?
Was This Post Helpful? 0
  • +
  • -

#35 pajczur  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 25-March 17

Posted 25 March 2017 - 02:39 AM

View Postsnoopy11, on 03 March 2012 - 09:53 AM, said:

Hi WeaselMummy,

Can't be totally sure as you don't include the
full error as it appears in your enviroment
just an abbreviated version of it.

My best guess is there is something wrong
with the series of includes.

#include "stdafx.h"

Should come first before any of the other
includes in vs.

If that doesn't work move the series of
Includes in the program into the
StdAfx.h header file. Then just include "StdAfx.h"
In the programs main.cpp.

Try that and let me know.

Best Wishes

Snoopy.


Hello, great thanks for your tutorial.
But unfortunately it doesn't work for me. Please could you help me. I would be very thankfull.
Great thanks in advance for any help.
Best regards.

And let's describe my situation:
I use Visual Studio 2017.

And after moving Includes to stdafx.h I still have errors. I can't attache screenshot it doesn't work here, I don't know why, my screenshot has 24 KB. But I can copy text of my errors:
1>------ Build started: Project: ConsoleApplication1, Configuration: Debug Win32 ------
1>stdafx.cpp
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(104): error C2065: 'CALLBACK': undeclared identifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(104): error C2065: 'LPFNPSPCALLBACKA': undeclared identifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(104): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(104): error C2513: 'int': no variable declared before '='
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(104): error C2143: syntax error: missing ';' before '('
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(104): error C2146: syntax error: missing ')' before identifier 'hwnd'
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(104): error C2146: syntax error: missing ';' before identifier 'hwnd'
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(104): error C2059: syntax error: ')'
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(105): error C2143: syntax error: missing ')' before '*'
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(105): error C2143: syntax error: missing ';' before '*'
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(105): error C2059: syntax error: ')'
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(105): error C2146: syntax error: missing ')' before identifier 'hwnd'
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(140): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(140): error C2146: syntax error: missing ';' before identifier 'PROPSHEETPAGE_RESOURCE'
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(198): error C3646: 'dwSize': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(198): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(198): error C3646: 'dwFlags': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(198): error C3646: 'hInstance': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(198): error C3646: 'pszTemplate': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(198): error C3646: 'pResource': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(198): error C3646: 'hIcon': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(198): error C3646: 'pszIcon': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(198): error C3646: 'pszTitle': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(198): error C3646: 'pfnDlgProc': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(198): error C3646: 'lParam': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(198): error C3646: 'pfnCallback': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(204): error C3646: 'dwSize': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(204): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(204): error C3646: 'dwFlags': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(204): error C3646: 'hInstance': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(204): error C3646: 'pszTemplate': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(204): error C3646: 'pResource': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(204): error C3646: 'hIcon': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(204): error C3646: 'pszIcon': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(204): error C3646: 'pszTitle': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(204): error C3646: 'pfnDlgProc': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(204): error C3646: 'lParam': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(204): error C3646: 'pfnCallback': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(206): error C3646: 'pszHeaderTitle': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(206): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(207): error C3646: 'pszHeaderSubTitle': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(207): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(213): error C3646: 'dwSize': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(213): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(213): error C3646: 'dwFlags': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(213): error C3646: 'hInstance': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(213): error C3646: 'pszTemplate': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(213): error C3646: 'pResource': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(213): error C3646: 'hIcon': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(213): error C3646: 'pszIcon': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(213): error C3646: 'pszTitle': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(213): error C3646: 'pfnDlgProc': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(213): error C3646: 'lParam': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(213): error C3646: 'pfnCallback': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(215): error C3646: 'pszHeaderTitle': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(215): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(216): error C3646: 'pszHeaderSubTitle': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(216): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(218): error C3646: 'hActCtx': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(218): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(225): error C3646: 'dwSize': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(225): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(225): error C3646: 'dwFlags': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(225): error C3646: 'hInstance': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(225): error C3646: 'pszTemplate': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(225): error C3646: 'pResource': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(225): error C3646: 'hIcon': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(225): error C3646: 'pszIcon': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(225): error C3646: 'pszTitle': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(225): error C3646: 'pfnDlgProc': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(225): error C3646: 'lParam': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(225): error C3646: 'pfnCallback': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(227): error C3646: 'pszHeaderTitle': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(227): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(228): error C3646: 'pszHeaderSubTitle': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(228): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(230): error C3646: 'hActCtx': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(230): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(234): error C3646: 'hbmHeader': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(234): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(235): error C3646: 'pszbmHeader': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(235): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(244): error C3646: 'dwSize': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(244): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(244): error C3646: 'dwFlags': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(244): error C3646: 'hInstance': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(244): error C3646: 'pszTemplate': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(244): error C3646: 'pResource': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(244): error C3646: 'hIcon': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(244): error C3646: 'pszIcon': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(244): error C3646: 'pszTitle': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(244): error C3646: 'pfnDlgProc': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(244): error C3646: 'lParam': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(244): error C3646: 'pfnCallback': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(250): error C3646: 'dwSize': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(250): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(250): error C3646: 'dwFlags': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(250): error C3646: 'hInstance': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(250): error C3646: 'pszTemplate': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(250): error C3646: 'pResource': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(250): error C3646: 'hIcon': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(250): error C3646: 'pszIcon': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(250): error C3646: 'pszTitle': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(250): error C3646: 'pfnDlgProc': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(250): error C3646: 'lParam': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(250): error C3646: 'pfnCallback': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(252): error C3646: 'pszHeaderTitle': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(252): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(253): error C3646: 'pszHeaderSubTitle': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(253): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(259): error C3646: 'dwSize': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(259): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(259): error C3646: 'dwFlags': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(259): error C3646: 'hInstance': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(259): error C3646: 'pszTemplate': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(259): error C3646: 'pResource': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(259): error C3646: 'hIcon': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(259): error C3646: 'pszIcon': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(259): error C3646: 'pszTitle': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(259): error C3646: 'pfnDlgProc': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(259): error C3646: 'lParam': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(259): error C3646: 'pfnCallback': unknown override specifier
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\prsht.h(259): fatal error C1003: error count exceeds 100; stopping compilation
1>Done building project "ConsoleApplication1.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Was This Post Helpful? 0
  • +
  • -

#36 pajczur  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 25-March 17

Posted 28 March 2017 - 10:24 PM

Hello,
I'm sorry for stupid question, but I am totally beginer, I made some course about syntax of C++, but most code I mage for Windows Console (that black screen window looks like DOS), and not to much applications with their own window, GUI.

And I would like to pass that tutorial very much, but I don't know which type of project I should start. I mean, when I click in Visual studio "File/New/Project" there are a lot of options, and don't know which to use. My poor experience tells me that I can't choose just simple Win32 Console Application, but maybe it's OK? I don't know, please give me some advice.
For any help thanks in advance.
Best Regards
Was This Post Helpful? 0
  • +
  • -

#37 pajczur  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 25-March 17

Posted 28 March 2017 - 10:32 PM

View PostWeaselmummy, on 04 March 2012 - 05:42 AM, said:

Hey Snoopy,

Thanks for the reply! Got rid of the error, got some others now but I can
figure them out. Again, thanks!



Hello, could you explain how did you get rid of that error? I have exactly the same error. But changing/moving #include of stdafx.h (what Snoopy suggest) doesn't helped me. Did you use some other solution. Could you please explain please?
For any help thanks in advance.
Best Regards
Was This Post Helpful? 0
  • +
  • -

#38 snoopy11  Icon User is online

  • Engineering ● Software
  • member icon

Reputation: 1317
  • View blog
  • Posts: 4,025
  • Joined: 20-March 10

Posted 10 April 2017 - 11:46 AM

Its a win32 gui project so you would choose that ! win32 blank project.
Was This Post Helpful? 0
  • +
  • -

  • (3 Pages)
  • +
  • 1
  • 2
  • 3