You are not looking for a constant; a handle is typically acquired at runtime. In this case, by calling other functions of the Windows API.
Unfortunately, the documentation you need is not available on docs.rs. windows
and windows-sys
crates are generated from the Windows API metadata, and do not include any rustdoc. Instead, you need to go on https://learn.microsoft.com.
The documention for SetMonitorBrightness
is found here.
You’ll find information on how you can retrieve a handle properly:
I suggest you dig the documentation from here. At some point you will enumerate the monitors, filter out what does not interest you (you may receive pseudo-monitors), and so on until you have everything you need to call SetMonitorBrightness
, i.e., the handle for the monitor you are interested in.
You may also want to call GetMonitorBrightness
in order to find what are the minimum and maximum brightness values.