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
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
64 additions
and
34 deletions
+64
-34
propsheet.c
dlls/comctl32/propsheet.c
+64
-34
No files found.
dlls/comctl32/propsheet.c
View file @
2e301ceb
...
@@ -131,6 +131,7 @@ typedef struct tagPropSheetInfo
...
@@ -131,6 +131,7 @@ typedef struct tagPropSheetInfo
int
width
;
int
width
;
int
height
;
int
height
;
HIMAGELIST
hImageList
;
HIMAGELIST
hImageList
;
BOOL
ended
;
}
PropSheetInfo
;
}
PropSheetInfo
;
typedef
struct
typedef
struct
...
@@ -707,39 +708,21 @@ int PROPSHEET_CreateDialog(PropSheetInfo* psInfo)
...
@@ -707,39 +708,21 @@ int PROPSHEET_CreateDialog(PropSheetInfo* psInfo)
* -1 (error). */
* -1 (error). */
if
(
psInfo
->
unicode
)
if
(
psInfo
->
unicode
)
{
{
if
(
!
(
psInfo
->
ppshheader
.
dwFlags
&
PSH_MODELESS
))
ret
=
(
int
)
CreateDialogIndirectParamW
(
psInfo
->
ppshheader
.
hInstance
,
ret
=
DialogBoxIndirectParamW
(
psInfo
->
ppshheader
.
hInstance
,
(
LPDLGTEMPLATEW
)
temp
,
(
LPDLGTEMPLATEW
)
temp
,
psInfo
->
ppshheader
.
hwndParent
,
psInfo
->
ppshheader
.
hwndParent
,
PROPSHEET_DialogProc
,
PROPSHEET_DialogProc
,
(
LPARAM
)
psInfo
);
(
LPARAM
)
psInfo
);
if
(
!
ret
)
ret
=
-
1
;
else
{
ret
=
(
int
)
CreateDialogIndirectParamW
(
psInfo
->
ppshheader
.
hInstance
,
(
LPDLGTEMPLATEW
)
temp
,
psInfo
->
ppshheader
.
hwndParent
,
PROPSHEET_DialogProc
,
(
LPARAM
)
psInfo
);
if
(
!
ret
)
ret
=
-
1
;
}
}
}
else
else
{
{
if
(
!
(
psInfo
->
ppshheader
.
dwFlags
&
PSH_MODELESS
))
ret
=
(
int
)
CreateDialogIndirectParamA
(
psInfo
->
ppshheader
.
hInstance
,
ret
=
DialogBoxIndirectParamA
(
psInfo
->
ppshheader
.
hInstance
,
(
LPDLGTEMPLATEA
)
temp
,
(
LPDLGTEMPLATEA
)
temp
,
psInfo
->
ppshheader
.
hwndParent
,
psInfo
->
ppshheader
.
hwndParent
,
PROPSHEET_DialogProc
,
PROPSHEET_DialogProc
,
(
LPARAM
)
psInfo
);
(
LPARAM
)
psInfo
);
if
(
!
ret
)
ret
=
-
1
;
else
{
ret
=
(
int
)
CreateDialogIndirectParamA
(
psInfo
->
ppshheader
.
hInstance
,
(
LPDLGTEMPLATEA
)
temp
,
psInfo
->
ppshheader
.
hwndParent
,
PROPSHEET_DialogProc
,
(
LPARAM
)
psInfo
);
if
(
!
ret
)
ret
=
-
1
;
}
}
}
Free
(
temp
);
Free
(
temp
);
...
@@ -1757,7 +1740,7 @@ static BOOL PROPSHEET_Finish(HWND hwndDlg)
...
@@ -1757,7 +1740,7 @@ static BOOL PROPSHEET_Finish(HWND hwndDlg)
if
(
psInfo
->
isModeless
)
if
(
psInfo
->
isModeless
)
psInfo
->
activeValid
=
FALSE
;
psInfo
->
activeValid
=
FALSE
;
else
else
EndDialog
(
hwndDlg
,
TRUE
)
;
psInfo
->
ended
=
TRUE
;
return
TRUE
;
return
TRUE
;
}
}
...
@@ -1870,7 +1853,7 @@ static void PROPSHEET_Cancel(HWND hwndDlg, LPARAM lParam)
...
@@ -1870,7 +1853,7 @@ static void PROPSHEET_Cancel(HWND hwndDlg, LPARAM lParam)
psInfo
->
activeValid
=
FALSE
;
psInfo
->
activeValid
=
FALSE
;
}
}
else
else
EndDialog
(
hwndDlg
,
FALSE
)
;
psInfo
->
ended
=
TRUE
;
}
}
/******************************************************************************
/******************************************************************************
...
@@ -2396,7 +2379,7 @@ static BOOL PROPSHEET_RemovePage(HWND hwndDlg,
...
@@ -2396,7 +2379,7 @@ static BOOL PROPSHEET_RemovePage(HWND hwndDlg,
psInfo
->
active_page
=
-
1
;
psInfo
->
active_page
=
-
1
;
if
(
!
psInfo
->
isModeless
)
if
(
!
psInfo
->
isModeless
)
{
{
EndDialog
(
hwndDlg
,
FALSE
)
;
psInfo
->
ended
=
TRUE
;
return
TRUE
;
return
TRUE
;
}
}
}
}
...
@@ -2737,6 +2720,34 @@ static void PROPSHEET_CleanUp(HWND hwndDlg)
...
@@ -2737,6 +2720,34 @@ static void PROPSHEET_CleanUp(HWND hwndDlg)
GlobalFree
((
HGLOBAL
)
psInfo
);
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.@)
* PropertySheet (COMCTL32.@)
* PropertySheetA (COMCTL32.@)
* PropertySheetA (COMCTL32.@)
...
@@ -2787,7 +2798,11 @@ INT WINAPI PropertySheetA(LPCPROPSHEETHEADERA lppsh)
...
@@ -2787,7 +2798,11 @@ INT WINAPI PropertySheetA(LPCPROPSHEETHEADERA lppsh)
}
}
psInfo
->
unicode
=
FALSE
;
psInfo
->
unicode
=
FALSE
;
psInfo
->
ended
=
FALSE
;
bRet
=
PROPSHEET_CreateDialog
(
psInfo
);
bRet
=
PROPSHEET_CreateDialog
(
psInfo
);
if
(
!
psInfo
->
isModeless
)
bRet
=
do_loop
(
psInfo
);
return
bRet
;
return
bRet
;
}
}
...
@@ -2834,7 +2849,11 @@ INT WINAPI PropertySheetW(LPCPROPSHEETHEADERW lppsh)
...
@@ -2834,7 +2849,11 @@ INT WINAPI PropertySheetW(LPCPROPSHEETHEADERW lppsh)
}
}
psInfo
->
unicode
=
TRUE
;
psInfo
->
unicode
=
TRUE
;
psInfo
->
ended
=
FALSE
;
bRet
=
PROPSHEET_CreateDialog
(
psInfo
);
bRet
=
PROPSHEET_CreateDialog
(
psInfo
);
if
(
!
psInfo
->
isModeless
)
bRet
=
do_loop
(
psInfo
);
return
bRet
;
return
bRet
;
}
}
...
@@ -3039,7 +3058,7 @@ static BOOL PROPSHEET_DoCommand(HWND hwnd, WORD wID)
...
@@ -3039,7 +3058,7 @@ static BOOL PROPSHEET_DoCommand(HWND hwnd, WORD wID)
if
(
psInfo
->
isModeless
)
if
(
psInfo
->
isModeless
)
psInfo
->
activeValid
=
FALSE
;
psInfo
->
activeValid
=
FALSE
;
else
else
EndDialog
(
hwnd
,
result
)
;
psInfo
->
ended
=
TRUE
;
}
}
else
else
EnableWindow
(
hwndApplyBtn
,
FALSE
);
EnableWindow
(
hwndApplyBtn
,
FALSE
);
...
@@ -3424,6 +3443,17 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
...
@@ -3424,6 +3443,17 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
}
}
return
TRUE
;
return
TRUE
;
case
WM_SYSCOMMAND
:
switch
(
wParam
&
0xfff0
)
{
case
SC_CLOSE
:
PROPSHEET_Cancel
(
hwnd
,
1
);
return
TRUE
;
default:
return
FALSE
;
}
case
WM_NOTIFY
:
case
WM_NOTIFY
:
{
{
NMHDR
*
pnmh
=
(
LPNMHDR
)
lParam
;
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