Is there a difference in the way that the HDC type (Device Context Handle) is declared in Delphi 2007 versus Delphi XE2.
In D2007 the following code works fine, but produces a range check error in DXE2:
Control.Parent.Perform(WM_PAINT, Integer(DC), 0);
When stepping through the code in D2007 the value of DC (Device Context) seems to always be less than MaxInt but in DXE2 the value of DC is usually greater than MaxInt.
Why is the value of DC different in D2007 and DXE2 when run on the same machine (same project, same code, same OS)?
Is it safe to cast the DC to WParam (which I think is an unsigned integer) instead?