Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Moving Window With Mouse Using Imshow

I am using OpenCV 3.3 on a Win10 platform with C++.

Is there a way to enable the mouse to move a window shown with Imshow? I do see that there is a mouse callback function nut that seems more targeted at using mouse events to control an app rather than simple window control.

I wonder if this is something I am missing because this seems elemental.

If a callback function is required, any example code for moving a window appreciated.

Thanks

click to hide/show revision 2
merged revision

Moving Window With Mouse Using Imshow

I am using OpenCV 3.3 on a Win10 platform with C++.

Is there a way to enable the mouse to move a window shown with Imshow? I do see that there is a mouse callback function nut that seems more targeted at using mouse events to control an app rather than simple window control.

I wonder if this is something I am missing because this seems elemental.

If a callback function is required, any example code for moving a window appreciated.

Thanks

I am using OpenCV 3.3 on a Win10 platform with C++.

Is there a way to enable the mouse to move a window shown with Imshow? I do see that there is a mouse callback function nut that seems more targeted at using mouse events to control an app rather than simple window control.

I wonder if this is something I am missing because this seems elemental.

If a callback function, any example code for moving a window appreciated.

Thanks

Moving Window With Mouse Using Imshow

I am using OpenCV 3.3 on a Win10 platform with C++.

Is there a way to enable the mouse to move a window shown with Imshow? I do see that there is a mouse callback function nut that seems more targeted at using mouse events to control an app rather than simple window control.

I wonder if this is something I am missing because this seems elemental.

If a callback function is required, any example code for moving a window appreciated.

Thanks

I am using OpenCV 3.3 on a Win10 platform with C++.

Is there a way to enable the mouse to move a window shown with Imshow? I do see that there is a mouse callback function nut that seems more targeted at using mouse events to control an app rather than simple window control.

I wonder if this is something I am missing because this seems elemental.

If a callback function, any example code for moving a window appreciated.

Thanks

Moving Window With Mouse Using Imshow

I am using OpenCV 3.3 on a Win10 platform with C++.

Is there a way to enable the mouse to move a window shown with Imshow? I do see that there is a mouse callback function nut that seems more targeted at using mouse events to control an app rather than simple window control.

I wonder if this is something I am missing because this seems elemental.

If a callback function is required, any example code for moving a window appreciated.

Here is the relevant portion of my code:

    namedWindow("CPU window", WINDOW_NORMAL);// Create a window for display.
    moveWindow("CPU window", 0, 250);
    resizeWindow("CPU window", 1920, 1080);
    imshow("CPU window", tImage.MaskFrame);
    cv::waitKey(30);
    _getch();

Thanks