Click here to Skip to main content
15,891,136 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: re:What c++ container fits these requirements? Pin
Alan Kurlansky27-Jan-10 2:39
Alan Kurlansky27-Jan-10 2:39 
QuestionCreateCheckBox Pin
Member 686483926-Jan-10 8:32
Member 686483926-Jan-10 8:32 
QuestionRe: CreateCheckBox Pin
David Crow26-Jan-10 9:28
David Crow26-Jan-10 9:28 
AnswerRe: CreateCheckBox Pin
neyerMat26-Jan-10 12:30
neyerMat26-Jan-10 12:30 
QuestionCombo Box vertical scroll bar height Pin
dipuks26-Jan-10 8:02
dipuks26-Jan-10 8:02 
QuestionSocket details using PID Pin
Anu A Joseph26-Jan-10 7:50
Anu A Joseph26-Jan-10 7:50 
AnswerRe: Socket details using PID Pin
HetzelGJ26-Jan-10 14:40
HetzelGJ26-Jan-10 14:40 
QuestionCreateTimerQueueTimer huge delays [modified] Pin
BDMarler26-Jan-10 7:21
BDMarler26-Jan-10 7:21 
Hi,

I'm using CreateTimerQueueTimer to trigger a routine every second. Most of the time it works well, but every once in awhile it won't get triggered for upwards of 20 seconds. What could be causing it and how can I fix it? I run a couple of programs on the same machine using this call and they always stop responding at the same time due to the pause in this function.

Here's the code I'm using

HANDLE m_timerHandle;
DWORD dwTimerPeriod=1000;
HANDLE hTimerQueue = CreateTimerQueue();

BOOL success = ::CreateTimerQueueTimer(&m_timerHandle,hTimerQueue,(WAITORTIMERCALLBACK)TimerRoutine,this,dwTimerPeriod,dwTimerPeriod,WT_EXECUTEDEFAULT);

static SYSTEMTIME now2;

VOID CALLBACK TimerRoutine(PVOID lpParam, BOOLEAN TimerOrWaitFired)
{
	int nTime=getSecondsSinceTime(now2);
		if(nTime>=2)
			wc_logError("timerroutine slow!!! - %d\n",nTime);
	
	bCalcQuoteDelay=true;
	bLogStatus=true;
	::PostMessage(AfxGetApp()->m_pMainWnd->GetSafeHwnd(), WM_QUEUE_TIMER, NULL,NULL);
	
	GetLocalTime(&now2);
}


Thanks in advance!
Brian

modified on Tuesday, January 26, 2010 2:04 PM

AnswerRe: CreateTimerQueueTimer huge delays Pin
LunaticFringe26-Jan-10 7:42
LunaticFringe26-Jan-10 7:42 
QuestionHow to insert seperators in Toolbar (MFC CS 2005) Pin
Software200726-Jan-10 6:14
Software200726-Jan-10 6:14 
AnswerRe: How to insert seperators in Toolbar (MFC CS 2005) Pin
Maximilien26-Jan-10 6:21
Maximilien26-Jan-10 6:21 
GeneralRe: How to insert seperators in Toolbar (MFC CS 2005) Pin
Software200726-Jan-10 6:45
Software200726-Jan-10 6:45 
GeneralRe: How to insert seperators in Toolbar (MFC CS 2005) Pin
Maximilien26-Jan-10 6:53
Maximilien26-Jan-10 6:53 
GeneralRe: How to insert seperators in Toolbar (MFC CS 2005) Pin
Software200726-Jan-10 6:55
Software200726-Jan-10 6:55 
QuestionHow to load 2 tool bars in Main Frame (MFC) Pin
Software200726-Jan-10 4:49
Software200726-Jan-10 4:49 
QuestionRe: How to load 2 tool bars in Main Frame (MFC) Pin
Maximilien26-Jan-10 5:05
Maximilien26-Jan-10 5:05 
AnswerRe: How to load 2 tool bars in Main Frame (MFC) Pin
Software200726-Jan-10 5:15
Software200726-Jan-10 5:15 
AnswerRe: How to load 2 tool bars in Main Frame (MFC) Pin
Richard MacCutchan26-Jan-10 5:26
mveRichard MacCutchan26-Jan-10 5:26 
QuestionPrinting values in editbox using VC++ Pin
SNI26-Jan-10 4:20
SNI26-Jan-10 4:20 
AnswerRe: Printing values in editbox using VC++ Pin
Richard MacCutchan26-Jan-10 5:28
mveRichard MacCutchan26-Jan-10 5:28 
GeneralRe: Printing values in editbox using VC++ Pin
SNI26-Jan-10 18:12
SNI26-Jan-10 18:12 
GeneralRe: Printing values in editbox using VC++ Pin
Richard MacCutchan26-Jan-10 22:25
mveRichard MacCutchan26-Jan-10 22:25 
Questioncreating methods/functions in a seperate file Pin
benjamin yap26-Jan-10 4:01
benjamin yap26-Jan-10 4:01 
AnswerRe: creating methods/functions in a seperate file Pin
Cedric Moonen26-Jan-10 4:08
Cedric Moonen26-Jan-10 4:08 
AnswerRe: creating methods/functions in a seperate file Pin
Maximilien26-Jan-10 4:28
Maximilien26-Jan-10 4:28 

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.