Recent

Author Topic: Find declaration of ...  (Read 267 times)

440bx

  • Hero Member
  • *****
  • Posts: 5814
Find declaration of ...
« on: October 05, 2025, 07:56:43 pm »
Hello,

I'm going to use the Windows function "GetDeviceCaps" to illustrate what I'd like to do.

In the source, right clicking on GetDeviceCaps shows a popup menu with the option (among many) to "Find declaration of GetDeviceCaps".  This can occasionally be very handy.

Selecting that goes to (my definition of the function):
Code: Pascal  [Select][+][-]
  1. function GetDeviceCaps
  2.            (
  3.             Dc       : HDC;
  4.             CapIndex : longint
  5.            )
  6.          : longint; stdcall; external gdi32;
  7.  
The parameter CapIndex can have a value selected from a number of constants.  In this particular case, the number of constants is large and not necessarily defined close to where the GetDeviceCaps function is defined and even if it were, it isn't necessarily obvious that the constant SB_CONST_ALPHA is one of the many possible values CapIndex may have.

presume (as is the case) that the many possible constants are defined somewhere.  Is there a way to create a link between the parameter "CapIndex" and the constants that apply to it ?

IOW and as an example, ideally, I'd like to right click on "CapIndex" and select the imaginary "jump to possible value list" (or something along those lines.)  Of course, for something like that to work, there has to be a way to give the IDE a way to "connect/link" the parameter "CapIndex" to the list of constants that are valid for it.

That's my question: is there a way to connect/associate/link a parameter (CapIndex in this example) to the list of constant values that are valid for it ?

Thank you for your help.


FPC v3.2.2 and Lazarus v4.0rc3 on Windows 7 SP1 64bit.

 

TinyPortal © 2005-2018