Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
197a8e16
Commit
197a8e16
authored
Feb 13, 1999
by
Francois Boisvert
Committed by
Alexandre Julliard
Feb 13, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented the WIN31 Look mdi buttons and also some defines for the
magic menu items.
parent
b67af9cd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
15 deletions
+31
-15
menu.c
controls/menu.c
+4
-3
menu.h
include/menu.h
+4
-0
mdi.c
windows/mdi.c
+23
-12
No files found.
controls/menu.c
View file @
197a8e16
...
...
@@ -22,6 +22,7 @@
#include "sysmetrics.h"
#include "task.h"
#include "heap.h"
#include "menu.h"
#include "module.h"
#include "neexe.h"
#include "nonclient.h"
...
...
@@ -611,9 +612,9 @@ static HBITMAP32 MENU_LoadMagicItem(UINT32 id,BOOL32 hilite)
switch
(
id
)
{
case
3
:
return
(
hilite
?
hBmpMinimizeD
:
hBmpMinimize
);
case
2
:
return
(
hilite
?
hBmpMaximizeD
:
hBmpMaximize
);
case
5
:
return
(
hilite
?
hBmpClose
:
hBmpClose
);
case
MAGIC_REDUCE
:
return
(
hilite
?
hBmpMinimizeD
:
hBmpMinimize
);
case
MAGIC_RESTORE
:
return
(
hilite
?
hBmpMaximizeD
:
hBmpMaximize
);
case
MAGIC_CLOSE
:
return
(
hilite
?
hBmpClose
:
hBmpClose
);
default
:
return
0
;
}
...
...
include/menu.h
View file @
197a8e16
...
...
@@ -5,6 +5,10 @@
#ifndef __WINE_MENU_H
#define __WINE_MENU_H
#define MAGIC_REDUCE 3
#define MAGIC_RESTORE 2
#define MAGIC_CLOSE 5
extern
BOOL32
MENU_Init
(
void
);
extern
HMENU32
MENU_GetSysMenu
(
HWND32
hWndOwner
,
HMENU32
hSysPopup
);
extern
UINT32
MENU_GetMenuBarHeight
(
HWND32
hwnd
,
UINT32
menubarWidth
,
...
...
windows/mdi.c
View file @
197a8e16
...
...
@@ -25,6 +25,7 @@
#include "resource.h"
#include "struct32.h"
#include "sysmetrics.h"
#include "tweak.h"
#include "debug.h"
#define MDIF_NEEDUPDATE 0x0001
...
...
@@ -775,20 +776,24 @@ static BOOL32 MDI_AugmentFrameMenu( MDICLIENTINFO* ci, WND *frame,
TRACE
(
mdi
,
"
\t
got popup %04x in sysmenu %04x
\n
"
,
hSysPopup
,
child
->
hSysMenu
);
AppendMenu32A
(
frame
->
wIDmenu
,
MF_HELP
|
MF_BITMAP
,
SC_MINIMIZE
,
(
LPSTR
)(
DWORD
)
MAGIC_REDUCE
)
;
AppendMenu32A
(
frame
->
wIDmenu
,
MF_HELP
|
MF_BITMAP
,
SC_RESTORE
,
(
LPSTR
)(
DWORD
)
MAGIC_RESTORE
);
// The close button is only present in Win 95 look
if
(
TWEAK_WineLook
>
WIN31_LOOK
)
{
if
(
!
InsertMenu32A
(
frame
->
wIDmenu
,
0
,
MF_BYPOSITION
|
MF_BITMAP
|
MF_POPUP
,
hSysPopup
,
(
LPSTR
)(
DWORD
)
hBmpClose
))
{
TRACE
(
mdi
,
"not inserted
\n
"
);
DestroyMenu32
(
hSysPopup
);
return
0
;
}
// Using the magic menu id's to insert system buttons in the menu bar
AppendMenu32A
(
frame
->
wIDmenu
,
MF_HELP
|
MF_BITMAP
,
SC_MINIMIZE
,
(
LPSTR
)(
DWORD
)
3
)
;
AppendMenu32A
(
frame
->
wIDmenu
,
MF_HELP
|
MF_BITMAP
,
SC_RESTORE
,
(
LPSTR
)(
DWORD
)
2
);
AppendMenu32A
(
frame
->
wIDmenu
,
MF_HELP
|
MF_BITMAP
,
SC_CLOSE
,
(
LPSTR
)(
DWORD
)
5
);
SC_CLOSE
,
(
LPSTR
)(
DWORD
)
MAGIC_CLOSE
);
}
EnableMenuItem32
(
hSysPopup
,
SC_SIZE
,
MF_BYCOMMAND
|
MF_GRAYED
);
EnableMenuItem32
(
hSysPopup
,
SC_MOVE
,
MF_BYCOMMAND
|
MF_GRAYED
);
...
...
@@ -806,25 +811,31 @@ static BOOL32 MDI_AugmentFrameMenu( MDICLIENTINFO* ci, WND *frame,
static
BOOL32
MDI_RestoreFrameMenu
(
WND
*
frameWnd
,
HWND32
hChild
)
{
INT32
nItems
=
GetMenuItemCount32
(
frameWnd
->
wIDmenu
)
-
1
;
UINT32
iId
=
GetMenuItemID32
(
frameWnd
->
wIDmenu
,
nItems
)
;
TRACE
(
mdi
,
"f
or child %04x
\n
"
,
hChild
);
TRACE
(
mdi
,
"f
rameWnd %p,child %04x
\n
"
,
frameWnd
,
hChild
);
if
(
GetMenuItemID32
(
frameWnd
->
wIDmenu
,
nItems
)
!=
SC_CLOSE
)
if
(
!
(
iId
==
SC_RESTORE
||
iId
==
SC_CLOSE
)
)
return
0
;
if
(
TWEAK_WineLook
>
WIN31_LOOK
)
{
// app button
RemoveMenu32
(
frameWnd
->
wIDmenu
,
0
,
MF_BYPOSITION
);
// close
DeleteMenu32
(
frameWnd
->
wIDmenu
,
GetMenuItemCount32
(
frameWnd
->
wIDmenu
)
-
1
,
MF_BYPOSITION
);
}
// restore
DeleteMenu32
(
frameWnd
->
wIDmenu
,
GetMenuItemCount32
(
frameWnd
->
wIDmenu
)
-
1
,
MF_BYPOSITION
);
// minimize
DeleteMenu32
(
frameWnd
->
wIDmenu
,
GetMenuItemCount32
(
frameWnd
->
wIDmenu
)
-
1
,
MF_BYPOSITION
);
DrawMenuBar32
(
frameWnd
->
hwndSelf
);
return
1
;
}
/**********************************************************************
* MDI_UpdateFrameText
*
...
...
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