I have a struct called Slider that creates a win32 trackbar control, the creation goes well, it creates without any problem, the problem that i have is when i tried to get the position of the thumb of the trackbar, when i handle the messagge WM_HSCROLL the value updates without any problem and stores in a variable that i have inside the struct called thumbValue, but the problem comes when te function that updates the value goes out of scope, because when this happens the value resets and becomes 0 again. I’m would like to gave you some code snippets but the code is to big, so i would put the link of the github repository so you can check all the code and help me. https://github.com/dabo96/WinUi_v3.0.git
Also i need to mention that the window that manage the slider messages like WM_HSCROLL is the ToolBarWindow, so you can check in ToolbarWindow.cpp the message and how i manage the update of the thumbValue variable.
I forgot to mention that i’m creating a gui library and i’m using some typedef to speed up the creation of the controls so if you see something like WUISlider, that is a typedef that is equal to std::shared_ptrControl::Slider. I hope you can help me because i tried too many ways to achieve without good results.
Daniel Borja is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.