diff --git a/modules/highgui/src/precomp.hpp b/modules/highgui/src/precomp.hpp index 1d72a5d7a2..1bcc22f610 100644 --- a/modules/highgui/src/precomp.hpp +++ b/modules/highgui/src/precomp.hpp @@ -114,6 +114,8 @@ double cvGetRatioWindow_GTK(const char* name); double cvGetOpenGlProp_W32(const char* name); double cvGetOpenGlProp_GTK(const char* name); +double cvGetPropVisible_W32(const char* name); + //for QT #if defined (HAVE_QT) CvRect cvGetWindowRect_QT(const char* name); diff --git a/modules/highgui/src/window.cpp b/modules/highgui/src/window.cpp index ad08af60c0..939d3c4eb1 100644 --- a/modules/highgui/src/window.cpp +++ b/modules/highgui/src/window.cpp @@ -156,6 +156,8 @@ CV_IMPL double cvGetWindowProperty(const char* name, int prop_id) case CV_WND_PROP_VISIBLE: #if defined (HAVE_QT) return cvGetPropVisible_QT(name); + #elif defined(HAVE_WIN32UI) + return cvGetPropVisible_W32(name); #else return -1; #endif diff --git a/modules/highgui/src/window_w32.cpp b/modules/highgui/src/window_w32.cpp index e67fb4e187..e7141cb82c 100644 --- a/modules/highgui/src/window_w32.cpp +++ b/modules/highgui/src/window_w32.cpp @@ -629,6 +629,24 @@ double cvGetOpenGlProp_W32(const char* name) return result; } +double cvGetPropVisible_W32(const char* name) +{ + double result = -1; + + CV_FUNCNAME( "cvGetPropVisible_W32" ); + + __BEGIN__; + + if (!name) + CV_ERROR( CV_StsNullPtr, "NULL name string" ); + + result = (icvFindWindowByName( name ) != NULL); + + __END__; + + return result; +} + // OpenGL support