Commit 6167469b authored by Andrey Kamaev's avatar Andrey Kamaev

Fixed fullscreen window mode on Windows.

parent fd5b0c1f
...@@ -48,6 +48,16 @@ ...@@ -48,6 +48,16 @@
#include "cvconfig.h" #include "cvconfig.h"
#if defined WIN32 || defined _WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#undef min
#undef max
void FillBitmapInfo( BITMAPINFO* bmi, int width, int height, int bpp, int origin );
#endif
#include "opencv2/highgui/highgui.hpp" #include "opencv2/highgui/highgui.hpp"
#include "opencv2/highgui/highgui_c.h" #include "opencv2/highgui/highgui_c.h"
#include "opencv2/imgproc/imgproc_c.h" #include "opencv2/imgproc/imgproc_c.h"
...@@ -64,16 +74,6 @@ ...@@ -64,16 +74,6 @@
#include "opencv2/highgui/highgui_tegra.hpp" #include "opencv2/highgui/highgui_tegra.hpp"
#endif #endif
#if defined WIN32 || defined _WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#undef min
#undef max
void FillBitmapInfo( BITMAPINFO* bmi, int width, int height, int bpp, int origin );
#endif
/* Errors */ /* Errors */
#define HG_OK 0 /* Don't bet on it! */ #define HG_OK 0 /* Don't bet on it! */
#define HG_BADNAME -1 /* Bad window or file name */ #define HG_BADNAME -1 /* Bad window or file name */
......
...@@ -420,7 +420,7 @@ void cvSetModeWindow_W32( const char* name, double prop_value)//Yannick Verdie ...@@ -420,7 +420,7 @@ void cvSetModeWindow_W32( const char* name, double prop_value)//Yannick Verdie
if (window->status==CV_WINDOW_FULLSCREEN && prop_value==CV_WINDOW_NORMAL) if (window->status==CV_WINDOW_FULLSCREEN && prop_value==CV_WINDOW_NORMAL)
{ {
icvLoadWindowPos(window->name,position ); icvLoadWindowPos(window->name,position );
SetWindowLongPtr(window->frame, GWL_STYLE, dwStyle | WS_CAPTION); SetWindowLongPtr(window->frame, GWL_STYLE, dwStyle | WS_CAPTION | WS_THICKFRAME);
SetWindowPos(window->frame, HWND_TOP, position.x, position.y , position.width,position.height, SWP_NOZORDER | SWP_FRAMECHANGED); SetWindowPos(window->frame, HWND_TOP, position.x, position.y , position.width,position.height, SWP_NOZORDER | SWP_FRAMECHANGED);
window->status=CV_WINDOW_NORMAL; window->status=CV_WINDOW_NORMAL;
...@@ -447,7 +447,7 @@ void cvSetModeWindow_W32( const char* name, double prop_value)//Yannick Verdie ...@@ -447,7 +447,7 @@ void cvSetModeWindow_W32( const char* name, double prop_value)//Yannick Verdie
//fullscreen //fullscreen
position.x=mi.rcMonitor.left;position.y=mi.rcMonitor.top; position.x=mi.rcMonitor.left;position.y=mi.rcMonitor.top;
position.width=mi.rcMonitor.right - mi.rcMonitor.left;position.height=mi.rcMonitor.bottom - mi.rcMonitor.top; position.width=mi.rcMonitor.right - mi.rcMonitor.left;position.height=mi.rcMonitor.bottom - mi.rcMonitor.top;
SetWindowLongPtr(window->frame, GWL_STYLE, dwStyle & ~WS_CAPTION); SetWindowLongPtr(window->frame, GWL_STYLE, dwStyle & ~WS_CAPTION & ~WS_THICKFRAME);
SetWindowPos(window->frame, HWND_TOP, position.x, position.y , position.width,position.height, SWP_NOZORDER | SWP_FRAMECHANGED); SetWindowPos(window->frame, HWND_TOP, position.x, position.y , position.width,position.height, SWP_NOZORDER | SWP_FRAMECHANGED);
window->status=CV_WINDOW_FULLSCREEN; window->status=CV_WINDOW_FULLSCREEN;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment