c++.mfc - problems with mmsystem.h
- marc_teichtahl hotmail.com Apr 16 2005
- "Walter" <newshound digitalmars.com> Aug 01 2005
Hi All,
I am trying to work with multimedia timers in a MFC based application.
I am including mmsystem.h in my class header
#ifndef __EVOL_CLOCK__
#define __EVOL_CLOCK__
#include <windows.h>
#include <mmsystem.h>
#include "evolDefs.h"
#include "evolClockCallback.h"
#include "evolArray.h"
#define CLOCK_RESOLUTION 1 // 1ms intervals
class evolClock
{
public:
evolClock();
virtual ~evolClock();
UINT registerEvolCallback(evolClockCallback* func);
UINT unRegisterEvolCallback(EVOL_CLOCK_HANDLE handle);
UINT startClock(EVOL_CLOCK_HANDLE handle);
UINT stopClock(EVOL_CLOCK_HANDLE handle);
protected:
UINT clockCounter;
evolArray<evolClockCallback*> clocks; }; #endif //__EVOL_CLOCK__
However, when compiling I get the following error
Program Files\dm\bin\sc.EXE -cpp -Ae -mn -C -o+time -D_WINDOWS -ff -Pz -S -3 -a8
-c -gf -D_CONSOLE=1 -D_DEBUG=1 -D_X86_=1 -D_MT=1 -D_WIN32=1 -D_MBCS=1
-oevolution.obj evolution.cpp Program Files\dm\bin\scpp.EXE -cpp -Ae -mn -C
+time -D_WINDOWS -ff -Pz -S -3 -a8 -gf -D_CONSOLE=1 -D_DEBUG=1 -D_X86_=1 -D_MT=1
-D_WIN32=1 -D_MBCS=1 evolution.cpp -oevolution.obj
Error: C:\PROGRAM FILES\DM\BIN\..\include\win32\MMSYSTEM.H(358): parameter list
is out of context
Error: C:\PROGRAM FILES\DM\BIN\..\include\win32\MMSYSTEM.H(363): ')' expected to
close function parameter list with
Error: C:\PROGRAM FILES\DM\BIN\..\include\win32\MMSYSTEM.H(406): ')' expected
Error: C:\PROGRAM FILES\DM\BIN\..\include\win32\MMSYSTEM.H(441): 'sndPlaySoundW'
is not in function parameter list Fatal Error: C:\PROGRAM
FILES\DM\BIN\..\include\win32\MMSYSTEM.H(487): too many errors Lines Processed:
81717 Errors: 5 Warnings: 0 Build failed
Im wondering if someone would be good enough to assist me is solvong this
problem ? I have run out of ideas myself and I now look to some more
knowledgeable people to help me
Thanks in advance
Marc Teichtahl
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.9.11 - Release Date: 4/14/2005
Apr 16 2005
<marc_teichtahl hotmail.com> wrote in message news:d3r90r$2tog$1 digitaldaemon.com...Hi All, I am trying to work with multimedia timers in a MFC based application. I am including mmsystem.h in my class header #ifndef __EVOL_CLOCK__ #define __EVOL_CLOCK__ #include <windows.h> #include <mmsystem.h> #include "evolDefs.h" #include "evolClockCallback.h" #include "evolArray.h" #define CLOCK_RESOLUTION 1 // 1ms intervals class evolClock { public: evolClock(); virtual ~evolClock(); UINT registerEvolCallback(evolClockCallback* func); UINT unRegisterEvolCallback(EVOL_CLOCK_HANDLE handle); UINT startClock(EVOL_CLOCK_HANDLE handle); UINT stopClock(EVOL_CLOCK_HANDLE handle); protected: UINT clockCounter; evolArray<evolClockCallback*> clocks; }; #endif //__EVOL_CLOCK__ However, when compiling I get the following error Program
-c -gf -D_CONSOLE=1 -D_DEBUG=1 -D_X86_=1 -D_MT=1 -D_WIN32=1 -D_MBCS=1 -oevolution.obj evolution.cpp Program
MT=1-D_WIN32=1 -D_MBCS=1 evolution.cpp -oevolution.obj Error: C:\PROGRAM FILES\DM\BIN\..\include\win32\MMSYSTEM.H(358): parameter
is out of context Error: C:\PROGRAM FILES\DM\BIN\..\include\win32\MMSYSTEM.H(363): ')'
close function parameter list with Error: C:\PROGRAM FILES\DM\BIN\..\include\win32\MMSYSTEM.H(406): ')'
Error: C:\PROGRAM FILES\DM\BIN\..\include\win32\MMSYSTEM.H(441):
is not in function parameter list Fatal Error: C:\PROGRAM FILES\DM\BIN\..\include\win32\MMSYSTEM.H(487): too many errors Lines
81717 Errors: 5 Warnings: 0 Build failed Im wondering if someone would be good enough to assist me is solvong this problem ? I have run out of ideas myself and I now look to some more knowledgeable people to help me
The first thing I'd do is get rid of all those command line switches. Next thing I'd do is try to cut the source file down to the minimum that exhibits the error.
Aug 01 2005








"Walter" <newshound digitalmars.com>