Hello, I wrote a C++ plugin for the rainmeter and I am returning a maximum value with the initialize function which is useful for the bar display, but I was wondering is there any way to display in a numerical form the INT I get back from that function as well as using it in a bar ?
Thank you very much for the reply.
It is currently April 26th, 2024, 11:15 pm
Displaying Maximum value as a numerical value?
-
- Posts: 2
- Joined: April 29th, 2011, 12:07 am
-
- Developer
- Posts: 2872
- Joined: April 17th, 2009, 12:18 pm
Re: Displaying Maximum value as a numerical value?
If I understood correct, you want to display the value returned in Initialize()?
-
- Posts: 2
- Joined: April 29th, 2011, 12:07 am
Re: Displaying Maximum value as a numerical value?
Yes, is it possible ?
-
- Developer
- Posts: 2872
- Joined: April 17th, 2009, 12:18 pm
Re: Displaying Maximum value as a numerical value?
Yes, although you'd have to handle it on the C++ side. For example, you could have:Virogenesis wrote:Yes, is it possible ?
Code: Select all
[mPlayer]
Measure=Plugin
Plugin=MyPlugin.dll
MyType=MaxValue
- Initialize(): Get MyType= and store it somewhere (lets say A). If A is MaxValue, then also store the max value in B.
- Update()/GetStringValue(): If A is MaxValue, then return B. Otherwise return something else.
For an example, you could check PowerPlugin.cpp.