Click here to Skip to main content
15,909,242 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: String Pin
Hamid_RT6-Jul-09 0:43
Hamid_RT6-Jul-09 0:43 
AnswerRe: String Pin
KarstenK6-Jul-09 2:48
mveKarstenK6-Jul-09 2:48 
AnswerRe: String Pin
TheGreatAndPowerfulOz6-Jul-09 10:51
TheGreatAndPowerfulOz6-Jul-09 10:51 
GeneralRe: String Pin
David Crow7-Jul-09 3:34
David Crow7-Jul-09 3:34 
GeneralRe: String Pin
TheGreatAndPowerfulOz16-Jul-09 8:30
TheGreatAndPowerfulOz16-Jul-09 8:30 
QuestionCreateTimerQueue() - questions about how it works? [modified] Pin
Souldrift5-Jul-09 23:40
Souldrift5-Jul-09 23:40 
AnswerRe: CreateTimerQueue() - questions about how it works? Pin
Stuart Dootson6-Jul-09 0:12
professionalStuart Dootson6-Jul-09 0:12 
GeneralRe: CreateTimerQueue() - questions about how it works? Pin
Souldrift6-Jul-09 1:36
Souldrift6-Jul-09 1:36 
Well, I made a small adaption to your code like this (some output and another timing behaviour)

#include <windows.h>
#include <tchar.h>
#include <iostream>

LONG count;
LARGE_INTEGER liStart, liEnd, liFreq;

VOID CALLBACK DoSendHere(__in_opt  LPVOID lpArgToCompletionRoutine,
                         __in      DWORD dwTimerLowValue,
                         __in      DWORD dwTimerHighValue)
{
   QueryPerformanceCounter(&liEnd);
   
   count++;
   std::cout << "Time = " << double(liEnd.QuadPart-liStart.QuadPart) / double(liFreq.QuadPart) << std::endl;
}

void SendLoop()
{
   HANDLE hTimerQueue = CreateTimerQueue();
   HANDLE hTimer;
   count = 0;
   QueryPerformanceFrequency(&liFreq);
   CreateTimerQueueTimer(&hTimer, hTimerQueue, (WAITORTIMERCALLBACK)&DoSendHere, 0 , 0, 9, WT_EXECUTEINTIMERTHREAD);
   QueryPerformanceCounter(&liStart);

   ::SleepEx(65, TRUE);
   LONG lCount = count;
   DeleteTimerQueueTimer(hTimerQueue, hTimer, 0);
   std::cout << "Time = " << double(liEnd.QuadPart-liStart.QuadPart) / double(liFreq.QuadPart) << std::endl;
   std::cout << "count = " << lCount << std::endl;
}

int _tmain(int argc, _TCHAR* argv[])
{
   SendLoop();
   getchar();
   return 0;
}


The result shows the same 15ms jumps I had before. Maybe there´s just no way around. I guess, I think some more and then we might have to settle for a different approach.

Thanks once again for ideas and brainstorming.

Souldrift
QuestionHow to read this type of text file in C/C++? Pin
Member 63711455-Jul-09 22:39
Member 63711455-Jul-09 22:39 
AnswerRe: How to read this type of text file in C/C++? Pin
Cedric Moonen5-Jul-09 22:43
Cedric Moonen5-Jul-09 22:43 
GeneralRe: How to read this type of text file in C/C++? Pin
Member 63711455-Jul-09 22:49
Member 63711455-Jul-09 22:49 
GeneralRe: How to read this type of text file in C/C++? Pin
Cedric Moonen5-Jul-09 23:21
Cedric Moonen5-Jul-09 23:21 
GeneralRe: How to read this type of text file in C/C++? Pin
Member 63711455-Jul-09 23:57
Member 63711455-Jul-09 23:57 
AnswerRe: How to read this type of text file in C/C++? Pin
CPallini5-Jul-09 23:31
mveCPallini5-Jul-09 23:31 
AnswerRe: How to read this type of text file in C/C++? Pin
Adam Roderick J6-Jul-09 5:53
Adam Roderick J6-Jul-09 5:53 
QuestionDatabase path Pin
MsmVc5-Jul-09 22:28
MsmVc5-Jul-09 22:28 
AnswerRe: Database path Pin
Stuart Dootson6-Jul-09 0:13
professionalStuart Dootson6-Jul-09 0:13 
Question[Message Deleted] [modified] Pin
rajapp5-Jul-09 21:24
rajapp5-Jul-09 21:24 
AnswerRe: how to add button control to a drawing Pin
Hamid_RT5-Jul-09 22:18
Hamid_RT5-Jul-09 22:18 
GeneralRe: how to add button control to a drawing Pin
rajapp6-Jul-09 0:30
rajapp6-Jul-09 0:30 
GeneralRe: how to add button control to a drawing Pin
Hamid_RT6-Jul-09 0:42
Hamid_RT6-Jul-09 0:42 
GeneralRe: how to add button control to a drawing Pin
chandu0046-Jul-09 1:56
chandu0046-Jul-09 1:56 
AnswerRe: how to add button control to a drawing Pin
Adam Roderick J6-Jul-09 6:01
Adam Roderick J6-Jul-09 6:01 
Answer[solved]adding button inside View class of MFC Pin
rajapp14-Jul-09 21:52
rajapp14-Jul-09 21:52 
QuestionPlease help me for sending Service Message! Pin
Le@rner5-Jul-09 21:00
Le@rner5-Jul-09 21:00 

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.