Click here to Skip to main content
15,912,756 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionTransparent TreeView Control in MFC CPP Pin
kalyani.homkar20-Nov-13 23:59
kalyani.homkar20-Nov-13 23:59 
AnswerRe: Transparent TreeView Control in MFC CPP Pin
kalyani.homkar21-Nov-13 0:05
kalyani.homkar21-Nov-13 0:05 
QuestionSSL CONNECTION Pin
Member 1041375220-Nov-13 20:44
Member 1041375220-Nov-13 20:44 
QuestionRe: SSL CONNECTION Pin
David Crow22-Nov-13 5:58
David Crow22-Nov-13 5:58 
QuestionCDhtmlDialog : With JavaScript calling C++ Pin
Don Guy20-Nov-13 16:02
Don Guy20-Nov-13 16:02 
QuestionStatic Analysis code reqired for C++ Pin
GauranG Shah20-Nov-13 0:59
GauranG Shah20-Nov-13 0:59 
AnswerRe: Static Analysis code reqired for C++ Pin
Chris Losinger20-Nov-13 1:43
professionalChris Losinger20-Nov-13 1:43 
GeneralRe: Static Analysis code reqired for C++ Pin
GauranG Shah20-Nov-13 4:45
GauranG Shah20-Nov-13 4:45 
AnswerRe: Static Analysis code reqired for C++ Pin
Marco Bertschi20-Nov-13 10:13
protectorMarco Bertschi20-Nov-13 10:13 
AnswerRe: Static Analysis code reqired for C++ Pin
Joe Woodbury22-Nov-13 5:37
professionalJoe Woodbury22-Nov-13 5:37 
GeneralRe: Static Analysis code reqired for C++ Pin
Stefan_Lang26-Nov-13 22:51
Stefan_Lang26-Nov-13 22:51 
GeneralRe: Static Analysis code reqired for C++ Pin
Joe Woodbury27-Nov-13 4:19
professionalJoe Woodbury27-Nov-13 4:19 
QuestionCancelWaitableTimer bug when used with socket? Pin
ehaerim17-Nov-13 15:13
ehaerim17-Nov-13 15:13 
AnswerRe: CancelWaitableTimer bug when used with socket? Pin
Orjan Westin19-Nov-13 5:28
professionalOrjan Westin19-Nov-13 5:28 
GeneralRe: CancelWaitableTimer bug when used with socket? Pin
ehaerim19-Nov-13 18:19
ehaerim19-Nov-13 18:19 
AnswerRe: CancelWaitableTimer bug when used with socket? Pin
Randor 20-Nov-13 7:29
professional Randor 20-Nov-13 7:29 
GeneralRe: CancelWaitableTimer bug when used with socket? Pin
ehaerim20-Nov-13 9:46
ehaerim20-Nov-13 9:46 
GeneralRe: CancelWaitableTimer bug when used with socket? Pin
Randor 20-Nov-13 10:55
professional Randor 20-Nov-13 10:55 
GeneralRe: CancelWaitableTimer bug when used with socket? Pin
ehaerim20-Nov-13 11:36
ehaerim20-Nov-13 11:36 
Can you clearly explain why the code below triggers the timer twice from time to time, say once in 5-10 executions?
MSDN does not explain this weird phenomenon at all.

#if !defined(BTF)
#define BTF(b) (b ? _T('T') : _T('F'))
#endif

#if !defined(ERR)
#define ERR(b, d) (b ? 0 : d)
#endif

BOOL CWTApp::InitInstance()
{
 CWinApp::InitInstance();

 HANDLE hTimer = CreateWaitableTimer( NULL, FALSE, NULL );

 BOOL bRet;
 DWORD dwErr;

#define WAITABLETIMER_DUETIME_INITIALLY   (0)
#define WAITABLETIMER_PERIOD              (USER_TIMER_MINIMUM * 200)
#define SLEEP_BEFORE_CWT                  Sleep(50)

 LARGE_INTEGER DueTime;
 DueTime.QuadPart = WAITABLETIMER_DUETIME_INITIALLY;

 bRet = SetWaitableTimer(hTimer, &DueTime, WAITABLETIMER_PERIOD, NULL, NULL, FALSE);
 ATLTRACE(_T("SetWaitableTimer_1(hTimer)=%c/%d\n"), BTF(bRet), ERR(bRet, GetLastError()));

 dwErr = WaitForSingleObject(hTimer, INFINITE);
 ATLTRACE(_T("Timer(1) was signaled. dwErr=%d\n"), dwErr);

 SLEEP_BEFORE_CWT;
 bRet = CancelWaitableTimer(hTimer);
 ATLTRACE(_T("CancelWaitableTimer(hTimer)=%c\n"), BTF(bRet), ERR(bRet, GetLastError()));

 dwErr = WaitForSingleObject(hTimer, INFINITE);
 ATLTRACE(_T("Timer(2) was signaled. dwErr=%d\n"), dwErr);

 bRet = CloseHandle(hTimer);

 return FALSE;
} 


modified 23-Nov-13 14:27pm.

QuestionIs it possible to enumerate symbols in a PDB file using DBGHELP.LIB - NO Process Loaded. Pin
Blake Miller15-Nov-13 13:02
Blake Miller15-Nov-13 13:02 
AnswerRe: Is it possible to enumerate symbols in a PDB file using DBGHELP.LIB - NO Process Loaded. Pin
Randor 18-Nov-13 5:54
professional Randor 18-Nov-13 5:54 
QuestionCatch ENTER key on CBitmapButton Pin
_Flaviu15-Nov-13 2:38
_Flaviu15-Nov-13 2:38 
QuestionRe: Catch ENTER key on CBitmapButton Pin
Richard MacCutchan15-Nov-13 3:01
mveRichard MacCutchan15-Nov-13 3:01 
AnswerRe: Catch ENTER key on CBitmapButton Pin
_Flaviu15-Nov-13 3:02
_Flaviu15-Nov-13 3:02 
AnswerRe: Catch ENTER key on CBitmapButton Pin
_Flaviu17-Nov-13 21:33
_Flaviu17-Nov-13 21:33 

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.