I would like to find the values of some of windows API constants, such as, but not limited to LVM_ENABLEGROUPVIEW & WM_SHOWWINDOW
Looking on the n
Most of them can be found in the VCL source, primarily in the Windows.pas file. Your best bet is to do a Search|Find In Files, type the name of the constant you want to find the value for, set the Search Directories option, set the file mask to *.pas, and enter the path to the folder containing Windows.pas. The IDE will find all uses of the constant and put them in a Search Results window; double-clicking on the source line in that window will open the file at that line.
Others can, as Kevin and GameCat mentioned, can be found in the header (.h) files in the Windows SDK, downloadable from MSDN.
LVM_ENABLEGROUPVIEW and co are located in CommCtrls.pas - they probably are in Delphi 2007, but I haven't checked:
LVM_FIRST = $1000;
LVM_SETGROUPMETRICS = LVM_FIRST + 155;
LVM_GETGROUPMETRICS = LVM_FIRST + 156;
LVM_ENABLEGROUPVIEW = LVM_FIRST + 157;
LVM_SORTGROUPS = LVM_FIRST + 158;
WM_SHOWWINDOW
should be in Windows.pas for Delphi 2007 - start searching for SW_HIDE
. Alternatively you could go look at this post on translating API calls, which not only has the values you're looking for but also shows how to use them in a type-safe manner.
Delphi 2007's CommCtrl.pas has a lot of messages and API macros that are not used anywhere in the VCL, are not documented in Delphi and the unit is always well worth a look.
More generally, if you look up any API call on MSDN (or the Delphi help files), it lists the name of the header file right at the bottom under Function Information. If this header is in Win*.h, go look at Windows.pas. Most other things are to be found in the pas file with that name (so commctrl.h becomes commctrl.pas).
Update: LVM_ENABLEGROUPVIEW
as well as the ListView_EnableGroupView
macro are available on Delphi 2007.
You can look at the windows unit source (and related units) for the constants. They have limited comments for their use.
The windows SDK help provides some more answers.
Else the MSDN on the internet.
Getting a complete list will require some research. But in the end you will be able to find all the answers.
Download the SDK and search the header files (all the .h files) using your favorite full-text search tool.
Pinvoke.net can serve in a pinch (Constants) but doesn't necessarily have everything.
The message values are constant across all development environments.
The excellent Delphi JEDI project has converted most of the Windows API header files into delphi / pascal. Check out win32api at the JEDI site.
You can use ApiViewer. Initially developed for VB6, it can be set up to show declarations in object pascal language which could save you some typing.
Mind you though, its database is not perfect. Some function definitios are incorrect, some constants too (like 0xFFFF instead of 0xFFFFFFFF).