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

C / C++ / MFC

 
QuestionWindows Blinds... Pin
Polite Programmer22-Jun-07 21:09
Polite Programmer22-Jun-07 21:09 
Questiondestructor Pin
deeps_cute22-Jun-07 20:59
deeps_cute22-Jun-07 20:59 
AnswerRe: destructor Pin
Mark Salsbery23-Jun-07 8:24
Mark Salsbery23-Jun-07 8:24 
Questionprint problem Pin
Y_Kaushik22-Jun-07 20:43
Y_Kaushik22-Jun-07 20:43 
AnswerRe: print problem Pin
MANISH RASTOGI22-Jun-07 21:58
MANISH RASTOGI22-Jun-07 21:58 
GeneralRe: print problem Pin
Y_Kaushik22-Jun-07 22:09
Y_Kaushik22-Jun-07 22:09 
QuestionInstaller created shortcut Pin
rp_suman22-Jun-07 16:41
rp_suman22-Jun-07 16:41 
QuestionQueryPerformanceCounter - unreliable timing on win32 but perfect on x64 [modified] Pin
Cyrilix22-Jun-07 16:34
Cyrilix22-Jun-07 16:34 
I tried profiling the initial stage of my game engine today, and found out that in win32, the timing is not done correctly. The timing per frame is around 0.016-0.017 seconds (all of the time in x64, but only most of the time in win32). In win32, I will get occasional times that are in the order of 10^-5 seconds and also timing that is around 0.033-0.034 seconds (double the usual). It almost seems like the extra long timings are there to compensate for the extra short timings. Now, I've had this issue before, and I know that QueryPerformanceCounter can have issues on multiple cores / processors, as timing may jump from one processor to the other (and you may even end up with negative values when you subtract current minus last tick), which is why I call SetThreadAffinityMask() right before I do the timing and call SetThreadAffinityMask() again after that, to revert to the previous mask. Unfortunately, even with SetThreadAffinityMask(), your thread is not guaranteed to run on the core that you specify -- it is only a hint to the Windows operating system that you'd like to run on a specific core, so I can understand why I would still have issues even then, but what I don't understand is why compiling with the x64 compiler (running Visual C++ 2005 Pro) makes things work perfectly. Is there a fundamental hardware counter difference with win32 vs. x64 (or maybe a way that the timing is done)?

MODIFIED: I should mention, I get 0.016 because of Vsync, which does not allow you to go past 60 fps.

-- modified at 22:39 Friday 22nd June, 2007
QuestionHow to share a class between different projects in VC++? Pin
Skywalker200822-Jun-07 11:34
Skywalker200822-Jun-07 11:34 
AnswerRe: How to share a class between different projects in VC++? Pin
Hans Dietrich22-Jun-07 12:10
mentorHans Dietrich22-Jun-07 12:10 
GeneralRe: How to share a class between different projects in VC++? Pin
Cyrilix22-Jun-07 12:32
Cyrilix22-Jun-07 12:32 
GeneralRe: How to share a class between different projects in VC++? Pin
Mark Salsbery22-Jun-07 12:50
Mark Salsbery22-Jun-07 12:50 
GeneralRe: How to share a class between different projects in VC++? Pin
Cyrilix22-Jun-07 14:00
Cyrilix22-Jun-07 14:00 
GeneralRe: How to share a class between different projects in VC++? Pin
Mark Salsbery22-Jun-07 14:06
Mark Salsbery22-Jun-07 14:06 
GeneralRe: How to share a class between different projects in VC++? Pin
Skywalker200825-Jun-07 2:50
Skywalker200825-Jun-07 2:50 
QuestionHow to load a BMP from a resource dll Pin
sstainba22-Jun-07 10:07
sstainba22-Jun-07 10:07 
AnswerRe: How to load a BMP from a resource dll Pin
Mark Salsbery22-Jun-07 10:25
Mark Salsbery22-Jun-07 10:25 
GeneralRe: How to load a BMP from a resource dll Pin
sstainba22-Jun-07 11:22
sstainba22-Jun-07 11:22 
GeneralRe: How to load a BMP from a resource dll Pin
Mark Salsbery22-Jun-07 12:26
Mark Salsbery22-Jun-07 12:26 
GeneralRe: How to load a BMP from a resource dll Pin
sstainba22-Jun-07 12:32
sstainba22-Jun-07 12:32 
GeneralRe: How to load a BMP from a resource dll Pin
Mark Salsbery22-Jun-07 12:46
Mark Salsbery22-Jun-07 12:46 
GeneralRe: How to load a BMP from a resource dll Pin
sstainba22-Jun-07 12:51
sstainba22-Jun-07 12:51 
GeneralRe: How to load a BMP from a resource dll Pin
Mark Salsbery22-Jun-07 12:59
Mark Salsbery22-Jun-07 12:59 
GeneralRe: How to load a BMP from a resource dll Pin
sstainba22-Jun-07 13:11
sstainba22-Jun-07 13:11 
GeneralRe: How to load a BMP from a resource dll Pin
Mark Salsbery22-Jun-07 13:20
Mark Salsbery22-Jun-07 13:20 

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.