Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
caa3633c
Commit
caa3633c
authored
Dec 26, 2018
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #13451 from crackwitz:gdi-off-by-one
parents
7d692890
beba82b2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
window_w32.cpp
modules/highgui/src/window_w32.cpp
+11
-11
No files found.
modules/highgui/src/window_w32.cpp
View file @
caa3633c
...
...
@@ -1131,20 +1131,20 @@ static void icvUpdateWindowPos( CvWindow* window )
{
RECT
rmw
,
rw
=
icvCalcWindowRect
(
window
);
MoveWindow
(
window
->
hwnd
,
rw
.
left
,
rw
.
top
,
rw
.
right
-
rw
.
left
+
1
,
rw
.
bottom
-
rw
.
top
+
1
,
FALSE
);
rw
.
right
-
rw
.
left
,
rw
.
bottom
-
rw
.
top
,
FALSE
);
GetClientRect
(
window
->
hwnd
,
&
rw
);
GetWindowRect
(
window
->
frame
,
&
rmw
);
// Resize the mainhWnd window in order to make the bitmap fit into the child window
MoveWindow
(
window
->
frame
,
rmw
.
left
,
rmw
.
top
,
rmw
.
right
-
rmw
.
left
+
size
.
cx
-
rw
.
right
+
rw
.
left
,
rmw
.
bottom
-
rmw
.
top
+
size
.
cy
-
rw
.
bottom
+
rw
.
top
,
TRUE
);
size
.
cx
+
(
rmw
.
right
-
rmw
.
left
)
-
(
rw
.
right
-
rw
.
left
)
,
size
.
cy
+
(
rmw
.
bottom
-
rmw
.
top
)
-
(
rw
.
bottom
-
rw
.
top
)
,
TRUE
);
}
}
rect
=
icvCalcWindowRect
(
window
);
MoveWindow
(
window
->
hwnd
,
rect
.
left
,
rect
.
top
,
rect
.
right
-
rect
.
left
+
1
,
rect
.
bottom
-
rect
.
top
+
1
,
TRUE
);
rect
.
right
-
rect
.
left
,
rect
.
bottom
-
rect
.
top
,
TRUE
);
}
CV_IMPL
void
...
...
@@ -1331,18 +1331,18 @@ CV_IMPL void cvResizeWindow(const char* name, int width, int height )
{
rw
=
icvCalcWindowRect
(
window
);
MoveWindow
(
window
->
hwnd
,
rw
.
left
,
rw
.
top
,
rw
.
right
-
rw
.
left
+
1
,
rw
.
bottom
-
rw
.
top
+
1
,
FALSE
);
rw
.
right
-
rw
.
left
,
rw
.
bottom
-
rw
.
top
,
FALSE
);
GetClientRect
(
window
->
hwnd
,
&
rw
);
GetWindowRect
(
window
->
frame
,
&
rmw
);
// Resize the mainhWnd window in order to make the bitmap fit into the child window
MoveWindow
(
window
->
frame
,
rmw
.
left
,
rmw
.
top
,
rmw
.
right
-
rmw
.
left
+
width
-
rw
.
right
+
rw
.
left
,
rmw
.
bottom
-
rmw
.
top
+
height
-
rw
.
bottom
+
rw
.
top
,
TRUE
);
width
+
(
rmw
.
right
-
rmw
.
left
)
-
(
rw
.
right
-
rw
.
left
)
,
height
+
(
rmw
.
bottom
-
rmw
.
top
)
-
(
rw
.
bottom
-
rw
.
top
)
,
TRUE
);
}
rect
=
icvCalcWindowRect
(
window
);
MoveWindow
(
window
->
hwnd
,
rect
.
left
,
rect
.
top
,
rect
.
right
-
rect
.
left
+
1
,
rect
.
bottom
-
rect
.
top
+
1
,
TRUE
);
rect
.
right
-
rect
.
left
,
rect
.
bottom
-
rect
.
top
,
TRUE
);
__END__
;
}
...
...
@@ -1629,8 +1629,8 @@ static LRESULT CALLBACK HighGUIProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM
RECT
rect
=
icvCalcWindowRect
(
window
);
pos
->
x
=
rect
.
left
;
pos
->
y
=
rect
.
top
;
pos
->
cx
=
rect
.
right
-
rect
.
left
+
1
;
pos
->
cy
=
rect
.
bottom
-
rect
.
top
+
1
;
pos
->
cx
=
rect
.
right
-
rect
.
left
;
pos
->
cy
=
rect
.
bottom
-
rect
.
top
;
}
break
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment