Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jason Beetham
wine
Commits
738c06d9
Commit
738c06d9
authored
24 years ago
by
Huw D. M. Davies
Committed by
Alexandre Julliard
24 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fixed copying of the MDI 'Windows' menu items if the items are not of
type MFT_STRING.
parent
2d6eabac
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
windows/mdi.c
+21
-11
21 additions, 11 deletions
windows/mdi.c
with
21 additions
and
11 deletions
windows/mdi.c
+
21
−
11
View file @
738c06d9
...
...
@@ -249,20 +249,30 @@ static LRESULT MDISetMenu( HWND hwnd, HMENU hmenuFrame,
if
(
ci
->
nActiveChildren
)
{
INT
j
=
i
-
ci
->
nActiveChildren
+
1
;
char
buffer
[
100
]
;
UINT
id
,
state
;
LPWSTR
buffer
=
NULL
;
MENUITEMINFOW
mii
;
for
(
;
i
>=
j
;
i
--
)
{
id
=
GetMenuItemID
(
ci
->
hWindowMenu
,
i
);
state
=
GetMenuState
(
ci
->
hWindowMenu
,
i
,
MF_BYPOSITION
);
GetMenuStringA
(
ci
->
hWindowMenu
,
i
,
buffer
,
100
,
MF_BYPOSITION
);
DeleteMenu
(
ci
->
hWindowMenu
,
i
,
MF_BYPOSITION
);
InsertMenuA
(
hmenuWindow
,
pos
,
MF_BYPOSITION
|
MF_STRING
,
id
,
buffer
);
CheckMenuItem
(
hmenuWindow
,
pos
,
MF_BYPOSITION
|
(
state
&
MF_CHECKED
));
memset
(
&
mii
,
0
,
sizeof
(
mii
));
mii
.
cbSize
=
sizeof
(
mii
);
mii
.
fMask
=
MIIM_CHECKMARKS
|
MIIM_DATA
|
MIIM_ID
|
MIIM_STATE
|
MIIM_SUBMENU
|
MIIM_TYPE
|
MIIM_BITMAP
;
GetMenuItemInfoW
(
ci
->
hWindowMenu
,
i
,
TRUE
,
&
mii
);
if
(
mii
.
cch
)
{
/* Menu is MFT_STRING */
mii
.
cch
++
;
/* add room for '\0' */
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
mii
.
cch
*
sizeof
(
WCHAR
));
mii
.
dwTypeData
=
buffer
;
GetMenuItemInfoW
(
ci
->
hWindowMenu
,
i
,
TRUE
,
&
mii
);
}
DeleteMenu
(
ci
->
hWindowMenu
,
i
,
MF_BYPOSITION
);
InsertMenuItemW
(
hmenuWindow
,
pos
,
TRUE
,
&
mii
);
if
(
buffer
)
{
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
buffer
=
NULL
;
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment