drawRotarySlider is giving me problems

gui

#1

Hey guys, I’ve just started using JUCE and I’m having some problems with drawRotarySlider on Visual Studio 2017. I’m following this tutorial https://juce.com/doc/tutorial_look_and_feel_customisation and everything seems to work except overriding the function drawRotarySlider.
I’m getting this error (C2555): https://msdn.microsoft.com/en-us/library/ke3es672.aspx
Apparently Visual Studio doesn’t recognize the function as void, maybe because I’m doing something wrong. Also it doesn’t allow me to create a OtherLookAndFeel class because “pure virtual function drawRotarySlider doesn’t have any element that invalidates it”. Any Ideas?


#2

It’s not quite clear if the problem you have is with your own version of the tutorial code, or the code provided in the .zip. If the source in the tutorial zip works Ok then you should probably post your code, if not, then perhaps one of the JUCE devs can help.


#3

I’ve already solved it. I don’t know why it took me so much time. I had to put the class OtherLookandFeel outside the constructor. Thank you for your answer Rory!