Click here to Skip to main content
16,008,175 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: read a single line from textfile Pin
Peter Molnar2-Oct-01 10:45
Peter Molnar2-Oct-01 10:45 
GeneralOutput window of Visual C++ Pin
Peter Molnar2-Oct-01 9:28
Peter Molnar2-Oct-01 9:28 
GeneralRe: Output window of Visual C++ Pin
Carlos Antollini2-Oct-01 9:30
Carlos Antollini2-Oct-01 9:30 
GeneralCreate Dll in VC++ for client that works in Delphi Pin
2-Oct-01 9:13
suss2-Oct-01 9:13 
GeneralRe: Create Dll in VC++ for client that works in Delphi Pin
Chris Losinger2-Oct-01 9:48
professionalChris Losinger2-Oct-01 9:48 
GeneralRe: Create Dll in VC++ for client that works in Delphi Pin
Tim Deveaux2-Oct-01 9:52
Tim Deveaux2-Oct-01 9:52 
GeneralThank you !! Pin
2-Oct-01 11:09
suss2-Oct-01 11:09 
GeneralMultimedia Timer question Pin
RobJones2-Oct-01 8:10
RobJones2-Oct-01 8:10 
Hello,
I am trying to implement a multimedia timer in my app.. So far I think most of what I have done is correct but I am having a few problems.. I have been refrencing http://www.codeproject.com/system/timers_intro.asp#MMTimers and it has helped out quite a bit.. Here is what I have implemented so far..
OnStart()
{
     .
     .
     .
     // Set resolution to the minimum supported by the system
     TIMECAPS tc;
     timeGetDevCaps(&tc, sizeof(TIMECAPS));
     DWORD resolution = min(max(tc.wPeriodMin, 0), tc.wPeriodMax);
     timeBeginPeriod(resolution);     

    // create the timer
    timeSetEvent(iS,resolution,TimerFunction,(DWORD)this,TIME_PERIODIC);


void CTimerDlg::MMTimerHandler(UINT nIDEvent)
{
	//decrement the count
	iS --;
	//format and display the count
	m_timer2.Display(iS,iM,iH,iD,(CString)m_strTimer2="%D:%H:%M:%S");		
}


void CALLBACK TimerFunction(UINT wTimerID, UINT msg, DWORD dwUser, DWORD dw1, DWORD dw2)
{
    // This is used only to call MMTimerHandler
    // Typically, this function is static member of CTimersDlg
    CTimerDlg* obj = (CTimerDlg*) dwUser;
    obj->MMTimerHandler(wTimerID);

}

When compiling I get a error that states "'timeSetEvent' : cannot convert parameter 3 from 'void (unsigned int,unsigned int,unsigned long,unsigned long,unsigned long)' to 'void (__stdcall *)(unsigned i
nt,unsigned int,unsigned long,unsigned long,unsigned long)'"

Anyone know what the problem may be?

Thanks again for helping out!
Rob
GeneralNever Mind Pin
RobJones2-Oct-01 11:03
RobJones2-Oct-01 11:03 
QuestionWhat's wrong with this code? Pin
2-Oct-01 8:05
suss2-Oct-01 8:05 
AnswerRe: What's wrong with this code? Pin
Chris Losinger2-Oct-01 8:21
professionalChris Losinger2-Oct-01 8:21 
AnswerRe: What's wrong with this code? Pin
Tim Deveaux2-Oct-01 8:52
Tim Deveaux2-Oct-01 8:52 
AnswerRe: What's wrong with this code? Pin
Rashid Thadha2-Oct-01 9:49
Rashid Thadha2-Oct-01 9:49 
GeneralCWinThread Pin
kakuni2-Oct-01 5:44
kakuni2-Oct-01 5:44 
GeneralRe: CWinThread Pin
Michael Dunn2-Oct-01 5:53
sitebuilderMichael Dunn2-Oct-01 5:53 
GeneralRe: CWinThread Pin
kakuni2-Oct-01 11:39
kakuni2-Oct-01 11:39 
GeneralRe: CWinThread Pin
Michael Dunn2-Oct-01 17:46
sitebuilderMichael Dunn2-Oct-01 17:46 
Generalwindow messages in com Pin
Christer2-Oct-01 3:22
Christer2-Oct-01 3:22 
GeneralSTLPort-4.5 Pin
Michael Martin2-Oct-01 2:35
professionalMichael Martin2-Oct-01 2:35 
GeneralRe: STLPort-4.5 Pin
Jim Crafton2-Oct-01 3:13
Jim Crafton2-Oct-01 3:13 
GeneralRe: STLPort-4.5 Pin
Michael Martin2-Oct-01 3:59
professionalMichael Martin2-Oct-01 3:59 
GeneralRe: STLPort-4.5 Pin
CodeGuy2-Oct-01 3:39
CodeGuy2-Oct-01 3:39 
QuestionWhat did I get in the call stack??? Pin
Chaos Lawful2-Oct-01 2:16
Chaos Lawful2-Oct-01 2:16 
GeneralMultiprocessor resources/Realtime Pin
Stan the man2-Oct-01 2:05
Stan the man2-Oct-01 2:05 
GeneralJust a question on WININET Pin
Chaos Lawful2-Oct-01 2:05
Chaos Lawful2-Oct-01 2:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.