Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2006-05

Adding constants to defines.inc (windows)

5 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Giulio Bernardi

Hi,
I was playing around with lazarus and I found that solution to a bug (6950) is trivial.
But it needs a constant (SPI_GETFLATMENU) that is not in rtl/win/wininc/defines.inc
(or rtl/win32/wininc/defines.inc for fpc 2.0.x).
Is it ok if I send a patch to add all SPI* constants (taken from latest winuser.h) to defines.inc?
I see that constants are ordered alphabetically. Would you like them ordered this way or
following MS order (by constant value)?.
Also, there are win2000/me or higher constants and winxp or higher constants.
Should they be merged or left separate from the others? I mean, something like:

..

     SPI_SETWORKAREA = 47;

{ Windows Me/2000 and higher }

     SPI_GETACTIVEWINDOWTRACKING = 4096;

..
{ Windows XP and higher }

     SPI_GETBLOCKSENDINPUTRESETS = 4134;

..

bye
Giulio

Reply by email

Florian Klaempfl
to Giulio Bernardi
Giulio Bernardi wrote 8 lines
Hi, I was playing around with lazarus and I found that solution to a bug (6950) is trivial. But it needs a constant (SPI_GETFLATMENU) that is not in rtl/win/wininc/defines.inc (or rtl/win32/wininc/defines.inc for fpc 2.0.x). Is it ok if I send a patch to add all SPI* constants (taken from latest winuser.h) to defines.inc?

Yes.

I see that constants are ordered alphabetically. Would you like them ordered this way or following MS order (by constant value)?.

Feel free to do it how you like ;)

Show quoted text 12 lines
Also, there are win2000/me or higher constants and winxp or higher constants. Should they be merged or left separate from the others? I mean, something like: .. SPI_SETWORKAREA = 47; { Windows Me/2000 and higher } SPI_GETACTIVEWINDOWTRACKING = 4096; .. { Windows XP and higher } SPI_GETBLOCKSENDINPUTRESETS = 4134;

Constants don't hurt so they can be simply added.

Show quoted text 7 lines
.. bye Giulio _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email

Felipe Monteiro de Carvalho
to Giulio Bernardi: I was playing around with lazarus and I found that solution to a bug (6950) is trivial.…
Giulio Bernardi wrote 6 lines
Should they be merged or left separate from the others? I mean, something like: SPI_SETWORKAREA = 47; { Windows Me/2000 and higher } SPI_GETACTIVEWINDOWTRACKING = 4096;

I think it is a a good thing to add this small comment about the availability of the constant. Not mandatory, but a good thing. Comments are exactly hints for the person reading the code.

Felipe Monteiro de Carvalho

Reply by email