Re: Passing A Float In WParam or LParam of Windows Message

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Jeffrey Tan[MSFT] wrote:
Hi Dave,

I am not sure I understand your problem completely. Can you help to explain the following statement clearer?
"in my OnNotifyMessage override, I get a float (Single) but of the large, "integer" value it things LParam must be (but it's not, it's a 4-byte floating point value)."

Based on my experience, m.LParam is of type "IntPtr", however, it should be no problem to convert it into Single if you are sure that this message's lParam is actually float type.

What you say may be correct (I cannot verify, as I"M not in front of the C# system right now). But, yes, I do wish to treat this IntPtr as a Single (float) as that is what it is (really, it is!). I just have not found a way to do it (I am a new C# programmer, does it show?)

Thanks!
Dave
.



Relevant Pages

  • Re: How do I rotate a bitmap fast with high quality?
    ... and change float to int using fixed point algorithm. ... I want to know a new algorithm, with high quality and faster speed. ... >though,I could change double type to float type, ...
    (comp.graphics.algorithms)
  • Re: modf
    ... > Modf: Splits a floating-point value into fractional and integer parts. ... > integer portion is stored in *intptr and the ... > float modf( ... > Patrick Sullivan, AA-BA, BA-IT ...
    (microsoft.public.dotnet.languages.vb)
  • Re: max / min / smallest float value on Python 2.5
    ... smallest positive float I'm using, ... float type is build upon C's double precision float type on both 32 and ... The simple precision 32bit float type isn't used. ... four-digit mantissa, and for convenience ignore negative mantissas. ...
    (comp.lang.python)
  • Re: Float to string conversion in C#
    ... maps api call (which is definitely a float type) into the text ... the textfield doesnt seem to actually ... with the float value clearly inside the text field. ... Having said that, the error message completely threw me, and I dont ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: How to byte swap an IEEE Float?
    ... > convert first to a float type of that length, ... All the data in the file are of 32 bits float so that should be ok. ... fairly common task. ... better idea than handling it as a string. ...
    (comp.lang.ada)