Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

how to call windows CLI form from createTrackbar

Hi,

I am using OpenCV from Visual C++ 2013, using the CLI managed interface for handling the GUI. I have an openCV named window that displays the histogram of an image and I want to use a trackbar to set the threshold for binarization.

My problem is that I cant figure out how to define the onChange function within the context of CLI. I have tried defining a public method public: void myForm::ChangeThreshold(int,void*); in the form but I am forbidden from generating a pointer referencing it since it is a manged member. I can generate an unmanaged function but it would need to have a handle to the form so that it can update the threshold value in a textbox myForm::txtThreshold.

Any suggestions would be appreciated.

guy

how to call windows CLI form from createTrackbar

Hi,

I am using OpenCV from Visual C++ 2013, using the CLI managed interface for handling the GUI. I have an openCV named window that displays the histogram of an image and I want to use a trackbar to set the threshold for binarization.

My problem is that I cant figure out how to define the onChange function within the context of CLI. I have tried defining a public method public: void myForm::ChangeThreshold(int,void*); in the form but I am forbidden from generating a pointer referencing it since it is a manged member. I can generate an unmanaged function but it would need to have a handle to the form so that it can update the threshold value in a textbox myForm::txtThreshold.

Any suggestions would be appreciated.

guy