Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
6deccab6
Commit
6deccab6
authored
Sep 06, 2011
by
Francois Gouget
Committed by
Alexandre Julliard
Sep 06, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: Property sheets must be able to redraw themselves even if no page is selected.
parent
73f4e239
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
5 deletions
+34
-5
propsheet.c
dlls/comctl32/propsheet.c
+7
-4
propsheet.c
dlls/comctl32/tests/propsheet.c
+27
-1
No files found.
dlls/comctl32/propsheet.c
View file @
6deccab6
...
...
@@ -3201,17 +3201,20 @@ static LRESULT PROPSHEET_Paint(HWND hwnd, HDC hdcParam)
WCHAR
szBuffer
[
256
];
int
nLength
;
if
(
psInfo
->
active_page
<
0
)
return
1
;
hdc
=
hdcParam
?
hdcParam
:
BeginPaint
(
hwnd
,
&
ps
);
if
(
!
hdc
)
return
1
;
hdcSrc
=
CreateCompatibleDC
(
0
);
ppshpage
=
(
LPCPROPSHEETPAGEW
)
psInfo
->
proppage
[
psInfo
->
active_page
].
hpage
;
if
(
psInfo
->
ppshheader
.
dwFlags
&
PSH_USEHPLWATERMARK
)
hOldPal
=
SelectPalette
(
hdc
,
psInfo
->
ppshheader
.
hplWatermark
,
FALSE
);
if
(
(
!
(
ppshpage
->
dwFlags
&
PSP_HIDEHEADER
))
&&
if
(
psInfo
->
active_page
<
0
)
ppshpage
=
NULL
;
else
ppshpage
=
(
LPCPROPSHEETPAGEW
)
psInfo
->
proppage
[
psInfo
->
active_page
].
hpage
;
if
(
(
ppshpage
&&
!
(
ppshpage
->
dwFlags
&
PSP_HIDEHEADER
))
&&
(
psInfo
->
ppshheader
.
dwFlags
&
(
PSH_WIZARD97_OLD
|
PSH_WIZARD97_NEW
))
&&
(
psInfo
->
ppshheader
.
dwFlags
&
PSH_HEADER
)
)
{
...
...
@@ -3318,7 +3321,7 @@ static LRESULT PROPSHEET_Paint(HWND hwnd, HDC hdcParam)
SelectObject
(
hdcSrc
,
hbmp
);
}
if
(
(
ppshpage
->
dwFlags
&
PSP_HIDEHEADER
)
&&
if
(
(
ppshpage
&&
(
ppshpage
->
dwFlags
&
PSP_HIDEHEADER
)
)
&&
(
psInfo
->
ppshheader
.
dwFlags
&
(
PSH_WIZARD97_OLD
|
PSH_WIZARD97_NEW
))
&&
(
psInfo
->
ppshheader
.
dwFlags
&
PSH_WATERMARK
)
)
{
...
...
dlls/comctl32/tests/propsheet.c
View file @
6deccab6
...
...
@@ -33,6 +33,24 @@ static LONG active_page = -1;
#define IDC_APPLY_BUTTON 12321
/* try to make sure pending X events have been processed before continuing */
static
void
flush_events
(
void
)
{
MSG
msg
;
int
diff
=
200
;
int
min_timeout
=
100
;
DWORD
time
=
GetTickCount
()
+
diff
;
while
(
diff
>
0
)
{
if
(
MsgWaitForMultipleObjects
(
0
,
NULL
,
FALSE
,
min_timeout
,
QS_ALLINPUT
)
==
WAIT_TIMEOUT
)
break
;
while
(
PeekMessage
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
))
DispatchMessage
(
&
msg
);
diff
=
time
-
GetTickCount
();
}
}
static
int
CALLBACK
sheet_callback
(
HWND
hwnd
,
UINT
msg
,
LPARAM
lparam
)
{
switch
(
msg
)
...
...
@@ -121,7 +139,8 @@ static void test_nopage(void)
HPROPSHEETPAGE
hpsp
[
1
];
PROPSHEETPAGEA
psp
;
PROPSHEETHEADERA
psh
;
HWND
hdlg
;
HWND
hdlg
,
hpage
;
MSG
msg
;
memset
(
&
psp
,
0
,
sizeof
(
psp
));
psp
.
dwSize
=
sizeof
(
psp
);
...
...
@@ -148,7 +167,14 @@ static void test_nopage(void)
ShowWindow
(
hdlg
,
SW_NORMAL
);
SendMessage
(
hdlg
,
PSM_REMOVEPAGE
,
0
,
0
);
hpage
=
PropSheet_GetCurrentPageHwnd
(
hdlg
);
ok
(
hpage
==
NULL
,
"expected no current page, got %p, index=%d
\n
"
,
hpage
,
PropSheet_HwndToIndex
(
hdlg
,
hpage
));
flush_events
();
RedrawWindow
(
hdlg
,
NULL
,
NULL
,
RDW_UPDATENOW
|
RDW_ERASENOW
);
/* Check that the property sheet was fully redrawn */
ok
(
!
PeekMessage
(
&
msg
,
0
,
WM_PAINT
,
WM_PAINT
,
PM_NOREMOVE
),
"expected no pending WM_PAINT messages
\n
"
);
DestroyWindow
(
hdlg
);
}
...
...
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