Click here to Skip to main content
15,900,724 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionCan I construct CBitmap from heap Pin
m1m216-Sep-07 1:21
m1m216-Sep-07 1:21 
AnswerRe: Can I construct CBitmap from heap Pin
Mark Salsbery16-Sep-07 8:01
Mark Salsbery16-Sep-07 8:01 
GeneralRe: Can I construct CBitmap from heap Pin
m1m216-Sep-07 10:31
m1m216-Sep-07 10:31 
Questionundefined reference to `InitCommonControlsEx@4' ERROR Pin
$w0rdf1$h16-Sep-07 0:54
$w0rdf1$h16-Sep-07 0:54 
AnswerRe: undefined reference to `InitCommonControlsEx@4' ERROR Pin
$w0rdf1$h16-Sep-07 1:53
$w0rdf1$h16-Sep-07 1:53 
Questionunwanted exit of program Pin
Member 439909416-Sep-07 0:20
Member 439909416-Sep-07 0:20 
Questionhow can I clear overlay after using transparentblt Pin
gurucplusplus15-Sep-07 19:17
gurucplusplus15-Sep-07 19:17 
AnswerRe: how can I clear overlay after using transparentblt Pin
Mark Salsbery16-Sep-07 8:12
Mark Salsbery16-Sep-07 8:12 
GeneralRe: how can I clear overlay after using transparentblt Pin
gurucplusplus16-Sep-07 17:31
gurucplusplus16-Sep-07 17:31 
GeneralRe: how can I clear overlay after using transparentblt Pin
Mark Salsbery17-Sep-07 6:47
Mark Salsbery17-Sep-07 6:47 
GeneralRe: how can I clear overlay after using transparentblt Pin
gurucplusplus17-Sep-07 15:44
gurucplusplus17-Sep-07 15:44 
GeneralRe: how can I clear overlay after using transparentblt Pin
Mark Salsbery17-Sep-07 17:58
Mark Salsbery17-Sep-07 17:58 
GeneralRe: how can I clear overlay after using transparentblt Pin
gurucplusplus17-Sep-07 19:27
gurucplusplus17-Sep-07 19:27 
GeneralRe: how can I clear overlay after using transparentblt Pin
Mark Salsbery17-Sep-07 20:17
Mark Salsbery17-Sep-07 20:17 
GeneralRe: how can I clear overlay after using transparentblt Pin
gurucplusplus18-Sep-07 17:55
gurucplusplus18-Sep-07 17:55 
GeneralRe: how can I clear overlay after using transparentblt Pin
Mark Salsbery19-Sep-07 4:54
Mark Salsbery19-Sep-07 4:54 
Questionhow to Convert unsigned char to UTF-8,Unicode? Pin
kcynic15-Sep-07 16:47
kcynic15-Sep-07 16:47 
AnswerRe: how to Convert unsigned char to UTF-8,Unicode? Pin
Nemanja Trifunovic16-Sep-07 1:27
Nemanja Trifunovic16-Sep-07 1:27 
GeneralRe: how to Convert unsigned char to UTF-8,Unicode? Pin
kcynic16-Sep-07 15:30
kcynic16-Sep-07 15:30 
QuestionFunny timing results in threading project Pin
Cyrilix15-Sep-07 10:27
Cyrilix15-Sep-07 10:27 
AnswerRe: Funny timing results in threading project Pin
carrivick15-Sep-07 20:51
carrivick15-Sep-07 20:51 
GeneralRe: Funny timing results in threading project Pin
Cyrilix16-Sep-07 7:07
Cyrilix16-Sep-07 7:07 
AnswerRe: Funny timing results in threading project Pin
Randor 16-Sep-07 6:07
professional Randor 16-Sep-07 6:07 
Hi,

I believe when a thread does not have any sychronization objects associated with it, the OS kernel will yield and pre-empt the thread in a semi-random way, based on a priority-driven, preemptive scheduling algorithm. However once a thread has created a synchronization object the OS kernel begins to internally use this object as a reference point for yeilding process time. So by simply having created a synchronization object within a thread, the quantum timeslices should indeed become more uniform.

http://msdn2.microsoft.com/en-us/library/ms686364.aspx[^]

Maybe when your application is opening STD_INPUT_HANDLE or STD_OUTPUT_HANDLE an internal synchronization object is being created and causing the uniform quantum slices. This is just purely a guess.

It should also be noted that when using QueryPerformanceCounter on a multiprocessor computer that in order to retrieve the most accurate timestamp you should set the threads affinity mask to a single processor using SetThreadAffinityMask.

Best Wishes,
-Randor (David Delaune)
GeneralRe: Funny timing results in threading project Pin
Cyrilix16-Sep-07 7:05
Cyrilix16-Sep-07 7:05 
QuestionHow export functions from an exe file? Pin
Hongjun Ge15-Sep-07 7:18
Hongjun Ge15-Sep-07 7:18 

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.