Ask Your Question

Revision history [back]

cvSetMouseCallback function pointer winforms

I got a function

void on_mouse(int event,int x,int y,int flag, void *param) { //mouse functionality here }

Then the next function detectPositives() does inside the following command

cvSetMouseCallback(window_name,on_mouse, NULL);

And it doesnt seem to work using the function name as function pointer, which works perfectly in a CLI application, but not in this winform application header file.

Error message = error C3867: 'ObjectDetectionGUI::Form1::on_mouse': function call missing argument list; use '&ObjectDetectionGUI::Form1::on_mouse' to create a pointer to member

Anyone could help?

click to hide/show revision 2
No.2 Revision

cvSetMouseCallback function pointer winformsWinForms

I got a function

void on_mouse(int event,int x,int y,int event, int x, int y, int flag, void *param)
{
   //mouse functionality here
}

}

Then the next function detectPositives() detectPositives() does inside the following commandcommand inside

cvSetMouseCallback(window_name,on_mouse, NULL);

cvSetMouseCallback(window_name, on_mouse, NULL);

And it doesnt doesn't seem to work using the function name as function pointer, which works perfectly in a CLI application, but not in this winform WinForm application header file.

Error message = error C3867: 'ObjectDetectionGUI::Form1::on_mouse': function call  missing argument list; use '&ObjectDetectionGUI::Form1::on_mouse' to create a pointer  to member

member

Anyone could help?