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
2b8cda71
Commit
2b8cda71
authored
Jan 17, 2006
by
Michael Kaufmann
Committed by
Alexandre Julliard
Jan 17, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
static control: Better STM_GETIMAGE.
STM_GETIMAGE returns NULL if the given image type doesn't match the control's style.
parent
46d007ce
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
5 deletions
+29
-5
static.c
dlls/user/static.c
+29
-5
No files found.
dlls/user/static.c
View file @
2b8cda71
...
...
@@ -201,6 +201,32 @@ static HENHMETAFILE STATIC_SetEnhMetaFile( HWND hwnd, HENHMETAFILE hEnhMetaFile,
}
/***********************************************************************
* STATIC_GetImage
*
* Gets the bitmap for an SS_BITMAP control, the icon/cursor for an
* SS_ICON control or the enhanced metafile for an SS_ENHMETAFILE control.
*/
static
HANDLE
STATIC_GetImage
(
HWND
hwnd
,
WPARAM
wParam
,
DWORD
style
)
{
switch
(
style
&
SS_TYPEMASK
)
{
case
SS_ICON
:
if
((
wParam
!=
IMAGE_ICON
)
&&
(
wParam
!=
IMAGE_CURSOR
))
return
NULL
;
break
;
case
SS_BITMAP
:
if
(
wParam
!=
IMAGE_BITMAP
)
return
NULL
;
break
;
case
SS_ENHMETAFILE
:
if
(
wParam
!=
IMAGE_ENHMETAFILE
)
return
NULL
;
break
;
default:
return
NULL
;
}
return
(
HANDLE
)
GetWindowLongPtrW
(
hwnd
,
HICON_GWL_OFFSET
);
}
/***********************************************************************
* STATIC_LoadIconA
*
* Load the icon for an SS_ICON control.
...
...
@@ -473,13 +499,11 @@ static LRESULT StaticWndProc_common( HWND hwnd, UINT uMsg, WPARAM wParam,
return
0
;
case
STM_GETIMAGE
:
/* FIXME: Return NULL if wParam doesn't match the control's style.
wParam is IMAGE_BITMAP, IMAGE_CURSOR, IMAGE_ENHMETAFILE
or IMAGE_ICON */
return
(
LRESULT
)
STATIC_GetImage
(
hwnd
,
wParam
,
full_style
);
case
STM_GETICON16
:
case
STM_GETICON
:
/* FIXME: Return NULL if this control doesn't show an icon */
return
GetWindowLongPtrW
(
hwnd
,
HICON_GWL_OFFSET
);
return
(
LRESULT
)
STATIC_GetImage
(
hwnd
,
IMAGE_ICON
,
full_style
);
case
STM_SETIMAGE
:
switch
(
wParam
)
{
...
...
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