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
2e301ceb
Commit
2e301ceb
authored
Jun 15, 2005
by
Huw Davies
Committed by
Alexandre Julliard
Jun 15, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
For modal propsheets we should run our own message loop rather than
use a modal dialogbox just like Windows does. This helps apps that subclass the propsheet's wndproc.
parent
118ea908
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
22 deletions
+52
-22
propsheet.c
dlls/comctl32/propsheet.c
+52
-22
No files found.
dlls/comctl32/propsheet.c
View file @
2e301ceb
...
...
@@ -131,6 +131,7 @@ typedef struct tagPropSheetInfo
int
width
;
int
height
;
HIMAGELIST
hImageList
;
BOOL
ended
;
}
PropSheetInfo
;
typedef
struct
...
...
@@ -707,14 +708,6 @@ int PROPSHEET_CreateDialog(PropSheetInfo* psInfo)
* -1 (error). */
if
(
psInfo
->
unicode
)
{
if
(
!
(
psInfo
->
ppshheader
.
dwFlags
&
PSH_MODELESS
))
ret
=
DialogBoxIndirectParamW
(
psInfo
->
ppshheader
.
hInstance
,
(
LPDLGTEMPLATEW
)
temp
,
psInfo
->
ppshheader
.
hwndParent
,
PROPSHEET_DialogProc
,
(
LPARAM
)
psInfo
);
else
{
ret
=
(
int
)
CreateDialogIndirectParamW
(
psInfo
->
ppshheader
.
hInstance
,
(
LPDLGTEMPLATEW
)
temp
,
psInfo
->
ppshheader
.
hwndParent
,
...
...
@@ -722,15 +715,6 @@ int PROPSHEET_CreateDialog(PropSheetInfo* psInfo)
(
LPARAM
)
psInfo
);
if
(
!
ret
)
ret
=
-
1
;
}
}
else
{
if
(
!
(
psInfo
->
ppshheader
.
dwFlags
&
PSH_MODELESS
))
ret
=
DialogBoxIndirectParamA
(
psInfo
->
ppshheader
.
hInstance
,
(
LPDLGTEMPLATEA
)
temp
,
psInfo
->
ppshheader
.
hwndParent
,
PROPSHEET_DialogProc
,
(
LPARAM
)
psInfo
);
else
{
ret
=
(
int
)
CreateDialogIndirectParamA
(
psInfo
->
ppshheader
.
hInstance
,
...
...
@@ -740,7 +724,6 @@ int PROPSHEET_CreateDialog(PropSheetInfo* psInfo)
(
LPARAM
)
psInfo
);
if
(
!
ret
)
ret
=
-
1
;
}
}
Free
(
temp
);
...
...
@@ -1757,7 +1740,7 @@ static BOOL PROPSHEET_Finish(HWND hwndDlg)
if
(
psInfo
->
isModeless
)
psInfo
->
activeValid
=
FALSE
;
else
EndDialog
(
hwndDlg
,
TRUE
)
;
psInfo
->
ended
=
TRUE
;
return
TRUE
;
}
...
...
@@ -1870,7 +1853,7 @@ static void PROPSHEET_Cancel(HWND hwndDlg, LPARAM lParam)
psInfo
->
activeValid
=
FALSE
;
}
else
EndDialog
(
hwndDlg
,
FALSE
)
;
psInfo
->
ended
=
TRUE
;
}
/******************************************************************************
...
...
@@ -2396,7 +2379,7 @@ static BOOL PROPSHEET_RemovePage(HWND hwndDlg,
psInfo
->
active_page
=
-
1
;
if
(
!
psInfo
->
isModeless
)
{
EndDialog
(
hwndDlg
,
FALSE
)
;
psInfo
->
ended
=
TRUE
;
return
TRUE
;
}
}
...
...
@@ -2737,6 +2720,34 @@ static void PROPSHEET_CleanUp(HWND hwndDlg)
GlobalFree
((
HGLOBAL
)
psInfo
);
}
static
INT
do_loop
(
PropSheetInfo
*
psInfo
)
{
MSG
msg
;
INT
ret
=
-
1
;
HWND
hwnd
=
psInfo
->
hwnd
;
while
(
IsWindow
(
hwnd
)
&&
!
psInfo
->
ended
&&
(
ret
=
GetMessageW
(
&
msg
,
NULL
,
0
,
0
)))
{
if
(
ret
==
-
1
)
break
;
if
(
!
IsDialogMessageW
(
hwnd
,
&
msg
))
{
TranslateMessage
(
&
msg
);
DispatchMessageW
(
&
msg
);
}
}
if
(
ret
==
0
)
{
PostQuitMessage
(
msg
.
wParam
);
ret
=
-
1
;
}
DestroyWindow
(
hwnd
);
return
ret
;
}
/******************************************************************************
* PropertySheet (COMCTL32.@)
* PropertySheetA (COMCTL32.@)
...
...
@@ -2787,7 +2798,11 @@ INT WINAPI PropertySheetA(LPCPROPSHEETHEADERA lppsh)
}
psInfo
->
unicode
=
FALSE
;
psInfo
->
ended
=
FALSE
;
bRet
=
PROPSHEET_CreateDialog
(
psInfo
);
if
(
!
psInfo
->
isModeless
)
bRet
=
do_loop
(
psInfo
);
return
bRet
;
}
...
...
@@ -2834,7 +2849,11 @@ INT WINAPI PropertySheetW(LPCPROPSHEETHEADERW lppsh)
}
psInfo
->
unicode
=
TRUE
;
psInfo
->
ended
=
FALSE
;
bRet
=
PROPSHEET_CreateDialog
(
psInfo
);
if
(
!
psInfo
->
isModeless
)
bRet
=
do_loop
(
psInfo
);
return
bRet
;
}
...
...
@@ -3039,7 +3058,7 @@ static BOOL PROPSHEET_DoCommand(HWND hwnd, WORD wID)
if
(
psInfo
->
isModeless
)
psInfo
->
activeValid
=
FALSE
;
else
EndDialog
(
hwnd
,
result
)
;
psInfo
->
ended
=
TRUE
;
}
else
EnableWindow
(
hwndApplyBtn
,
FALSE
);
...
...
@@ -3424,6 +3443,17 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
}
return
TRUE
;
case
WM_SYSCOMMAND
:
switch
(
wParam
&
0xfff0
)
{
case
SC_CLOSE
:
PROPSHEET_Cancel
(
hwnd
,
1
);
return
TRUE
;
default:
return
FALSE
;
}
case
WM_NOTIFY
:
{
NMHDR
*
pnmh
=
(
LPNMHDR
)
lParam
;
...
...
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