question

MohitKumar-8008 avatar image
0 Votes"
MohitKumar-8008 asked JeanineZhang-MSFT commented

How to get the Windows display identity number programmatically in c++?

I would like to get the "Monitor identity number" which is on "Windows Display setting -> Rearrange your displays" menu.

c++
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@MohitKumar-8008

As far as I'm concerned, Windows does not provide a function that allows applications to obtain the numbers used by the display settings app.

I suggest you could refer to the links:
https://stackoverflow.com/questions/56570256/how-do-i-get-the-windows-display-monitor-screen-identity-number-programmatically
https://stackoverflow.com/a/56639420/11872808


0 Votes 0 ·

1 Answer

jiangshengvc avatar image
0 Votes"
jiangshengvc answered

There is nothing in MSDN Windows display APIs. It is not hard to write your own, though, if you know how to get a screen DC.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.