I just noticed a strange thing with this. Once I get a handle to the namedWindow I use it go set the cursor for that window with
dwresult = ::SetClassLong(hwCamera,
GCL_HCURSOR,
(LONG)LoadCursor(AfxGetInstanceHandle(),
MAKEINTRESOURCE(IDC_ARROW_NW)));
Which is a Win-API and it works with the handle returned from the OpenCV call
hwCamera = (HWND)cvGetWindowHandle(“cameraWindow”);
However, if I instead get the handle with
hwCamera = (HWND)FindWindow(NULL, _T(“cameraWindow”));
which is itself a Win-API call, the cursors never get changed as if that handle is not recognized or, more correctly, not the correct handle. So, apparently, the Windows FindWindow is not getting the correct handle to a OCV namedWindow.
I thought this was interesting.