Originally Posted by
Yarin
I don't think it can help to cast your float to a long and then cast it to DWORD, because in a couple of Windows headers, you'll simply find
Code:
typedef unsigned long DWORD
The first link you give multiplies the floating point value by UINT_MAX; I am not very surprised that things come out wrong in that case. The second link is just one of the many reasons to eschew .NET - it has nothing to do with C++ per se.
Can't you make a (small) test program which shows your problem in a few lines of code?
--
Computer Programming: An Introduction for the Scientifically Inclined