It is currently April 19th, 2024, 8:13 pm

Handling a WindowMessage and returning a value in C#

Tips and Tricks from the Rainmeter Community
User avatar
Samus Aran
Posts: 86
Joined: August 7th, 2009, 11:23 pm

Handling a WindowMessage and returning a value in C#

Post by Samus Aran »

Hi, Rainmeter Community :)
I got asked to make my app return a value if WindowMessaged by Rainmeter.
While I'd gladly implement that, I have no idea how. Do I have to override the WndProc()-method, and if so, how would I pass a value to Rainmeter only?
Thanks for any help in advance. :)
poiru
Developer
Posts: 2872
Joined: April 17th, 2009, 12:18 pm

Re: Handling a WindowMessage and returning a value in C#

Post by poiru »

A better (and easier) approach would be to write to the registry from your app (and using Measure=Registry in Rainmeter to read the values).
User avatar
Samus Aran
Posts: 86
Joined: August 7th, 2009, 11:23 pm

Re: Handling a WindowMessage and returning a value in C#

Post by Samus Aran »

Thanks, that worked. :)