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
7981d6c7
Commit
7981d6c7
authored
Dec 01, 2008
by
Maarten Lankhorst
Committed by
Alexandre Julliard
Dec 03, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Fix dialogs for 64-bits wine.
parent
7806e4d8
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
20 deletions
+25
-20
controls.h
dlls/user32/controls.h
+1
-4
defdlg.c
dlls/user32/defdlg.c
+21
-15
dialog16.c
dlls/user32/dialog16.c
+1
-1
win.h
dlls/user32/win.h
+2
-0
No files found.
dlls/user32/controls.h
View file @
7981d6c7
...
...
@@ -150,7 +150,7 @@ typedef struct
extern
BOOL
COMBO_FlipListbox
(
LPHEADCOMBO
,
BOOL
,
BOOL
)
DECLSPEC_HIDDEN
;
/* Dialog info structure */
typedef
struct
typedef
struct
tagDIALOGINFO
{
HWND
hwndFocus
;
/* Current control with focus */
HFONT
hUserFont
;
/* Dialog font */
...
...
@@ -165,9 +165,6 @@ typedef struct
#define DF_END 0x0001
#define DF_OWNERENABLED 0x0002
/* offset of DIALOGINFO ptr in dialog extra bytes */
#define DWLP_WINE_DIALOGINFO (DWLP_USER+sizeof(ULONG_PTR))
extern
DIALOGINFO
*
DIALOG_get_info
(
HWND
hwnd
,
BOOL
create
)
DECLSPEC_HIDDEN
;
extern
void
DIALOG_EnableOwner
(
HWND
hOwner
)
DECLSPEC_HIDDEN
;
extern
BOOL
DIALOG_DisableOwner
(
HWND
hOwner
)
DECLSPEC_HIDDEN
;
...
...
dlls/user32/defdlg.c
View file @
7981d6c7
...
...
@@ -230,8 +230,10 @@ static LRESULT DEFDLG_Proc( HWND hwnd, UINT msg, WPARAM wParam,
return
1
;
}
case
WM_NCDESTROY
:
if
(
(
dlgInfo
=
(
DIALOGINFO
*
)
SetWindowLongPtrW
(
hwnd
,
DWLP_WINE_DIALOGINFO
,
0
))
)
if
(
dlgInfo
)
{
WND
*
wndPtr
;
/* Free dialog heap (if created) */
if
(
dlgInfo
->
hDialogHeap
)
{
...
...
@@ -241,6 +243,10 @@ static LRESULT DEFDLG_Proc( HWND hwnd, UINT msg, WPARAM wParam,
if
(
dlgInfo
->
hUserFont
)
DeleteObject
(
dlgInfo
->
hUserFont
);
if
(
dlgInfo
->
hMenu
)
DestroyMenu
(
dlgInfo
->
hMenu
);
HeapFree
(
GetProcessHeap
(),
0
,
dlgInfo
);
wndPtr
=
WIN_GetPtr
(
hwnd
);
wndPtr
->
dlgInfo
=
NULL
;
WIN_ReleasePtr
(
wndPtr
);
}
/* Window clean-up */
return
DefWindowProcA
(
hwnd
,
msg
,
wParam
,
lParam
);
...
...
@@ -335,11 +341,18 @@ static LRESULT DEFDLG_Epilog(HWND hwnd, UINT msg, BOOL fResult)
DIALOGINFO
*
DIALOG_get_info
(
HWND
hwnd
,
BOOL
create
)
{
WND
*
wndPtr
;
DIALOGINFO
*
dlgInfo
=
(
DIALOGINFO
*
)
GetWindowLongPtrW
(
hwnd
,
DWLP_WINE_DIALOGINFO
)
;
DIALOGINFO
*
dlgInfo
;
if
(
!
dlgInfo
&&
create
)
wndPtr
=
WIN_GetPtr
(
hwnd
);
if
(
!
wndPtr
||
wndPtr
==
WND_OTHER_PROCESS
||
wndPtr
==
WND_DESKTOP
)
return
NULL
;
dlgInfo
=
wndPtr
->
dlgInfo
;
if
(
!
dlgInfo
&&
create
)
{
if
(
!
(
dlgInfo
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
dlgInfo
)
)))
return
NULL
;
if
(
!
(
dlgInfo
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
dlgInfo
)
)))
goto
out
;
dlgInfo
->
hwndFocus
=
0
;
dlgInfo
->
hUserFont
=
0
;
dlgInfo
->
hMenu
=
0
;
...
...
@@ -348,19 +361,12 @@ DIALOGINFO *DIALOG_get_info( HWND hwnd, BOOL create )
dlgInfo
->
idResult
=
0
;
dlgInfo
->
flags
=
0
;
dlgInfo
->
hDialogHeap
=
0
;
wndPtr
=
WIN_GetPtr
(
hwnd
);
if
(
wndPtr
&&
wndPtr
!=
WND_OTHER_PROCESS
&&
wndPtr
!=
WND_DESKTOP
)
{
wndPtr
->
dlgInfo
=
dlgInfo
;
wndPtr
->
flags
|=
WIN_ISDIALOG
;
WIN_ReleasePtr
(
wndPtr
);
SetWindowLongPtrW
(
hwnd
,
DWLP_WINE_DIALOGINFO
,
(
ULONG_PTR
)
dlgInfo
);
}
else
{
HeapFree
(
GetProcessHeap
(),
0
,
dlgInfo
);
return
NULL
;
}
}
out:
WIN_ReleasePtr
(
wndPtr
);
return
dlgInfo
;
}
...
...
dlls/user32/dialog16.c
View file @
7981d6c7
...
...
@@ -434,9 +434,9 @@ static HWND DIALOG_CreateIndirect16( HINSTANCE16 hInst, LPCVOID dlgTemplate,
}
wndPtr
=
WIN_GetPtr
(
hwnd
);
wndPtr
->
flags
|=
WIN_ISDIALOG
;
wndPtr
->
dlgInfo
=
dlgInfo
;
WIN_ReleasePtr
(
wndPtr
);
SetWindowLongPtrW
(
hwnd
,
DWLP_WINE_DIALOGINFO
,
(
LONG_PTR
)
dlgInfo
);
SetWindowLong16
(
HWND_16
(
hwnd
),
DWLP_DLGPROC
,
(
LONG
)
dlgProc
);
if
(
dlgInfo
->
hUserFont
)
...
...
dlls/user32/win.h
View file @
7981d6c7
...
...
@@ -31,6 +31,7 @@
#define WND_MAGIC 0x444e4957
/* 'WIND' */
struct
tagCLASS
;
struct
tagDIALOGINFO
;
typedef
struct
tagWND
{
...
...
@@ -60,6 +61,7 @@ typedef struct tagWND
HMENU
hSysMenu
;
/* window's copy of System Menu */
HICON
hIcon
;
/* window's icon */
HICON
hIconSmall
;
/* window's small icon */
struct
tagDIALOGINFO
*
dlgInfo
;
/* Dialog additional info (dialogs only) */
int
cbWndExtra
;
/* class cbWndExtra at window creation */
DWORD_PTR
userdata
;
/* User private data */
DWORD
wExtra
[
1
];
/* Window extra bytes */
...
...
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