NMHDR record member constants are declared as signed integers (probably legacy) but the winapi expects longword.
Original Reporter info from Mantis: Thaddy
-
Reporter name: Thaddy de Koning
Original Reporter info from Mantis: Thaddy
- Reporter name: Thaddy de Koning
Description:
NMHDR record member constants are declared as signed integers (probably legacy) but the winapi expects longword. Hence the compiler barks.
(/win/wininc/struct.inc is correct, messages.inc isn't)
Steps to reproduce:
const
HDM_TESTDUMMY = longword(-321);
var i:longint;
j:longword;
begin
i:=HDM_TESTDUMMY; //testlongword.pas(6,8) Warning: Range check error while evaluating constants (4294966975 must be between -2147483648 and 2147483647)
j:=HDM_TESTDUMMY; // OK.
writeln(i,'|',j);
end.
Additional information:
http://forum.lazarus.freepascal.org/index.php/topic,44923.msg316208.html#msg316208
Mantis conversion info:
- Mantis ID: 35324
- OS: Windows
- OS Build: all
- Build: 41825
- Platform: i386/arm/x86_64
- Version: 3.3.1
- Fixed in revision: 41922 (#75cdae98)