Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Zsolt Vadász
wine
Commits
186b4b68
Commit
186b4b68
authored
20 years ago
by
Dimitrie O. Paun
Committed by
Alexandre Julliard
20 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Use only Unicode functions, it makes it easier to see we are fully
Unicode compliant.
parent
3c98f79f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/comctl32/updown.c
+17
-16
17 additions, 16 deletions
dlls/comctl32/updown.c
with
17 additions
and
16 deletions
dlls/comctl32/updown.c
+
17
−
16
View file @
186b4b68
...
...
@@ -92,12 +92,12 @@ typedef struct
#define TIMER_ACCEL 2
#define TIMER_AUTOPRESS 3
#define BUDDY_UPDOWN_HWND "buddyUpDownHWND"
#define BUDDY_SUPERCLASS_WNDPROC "buddySupperClassWndProc"
#define UPDOWN_GetInfoPtr(hwnd) ((UPDOWN_INFO *)GetWindowLongPtrW (hwnd,0))
#define COUNT_OF(a) (sizeof(a)/sizeof(a[0]))
static
const
WCHAR
BUDDY_UPDOWN_HWND
[]
=
{
'b'
,
'u'
,
'd'
,
'd'
,
'y'
,
'U'
,
'p'
,
'D'
,
'o'
,
'w'
,
'n'
,
'H'
,
'W'
,
'N'
,
'D'
,
0
};
static
const
WCHAR
BUDDY_SUPERCLASS_WNDPROC
[]
=
{
'b'
,
'u'
,
'd'
,
'd'
,
'y'
,
'S'
,
'u'
,
'p'
,
'p'
,
'e'
,
'r'
,
'C'
,
'l'
,
'a'
,
's'
,
's'
,
'W'
,
'n'
,
'd'
,
'P'
,
'r'
,
'o'
,
'c'
,
0
};
static
void
UPDOWN_DoAction
(
UPDOWN_INFO
*
infoPtr
,
int
delta
,
int
action
);
/***********************************************************************
...
...
@@ -427,12 +427,12 @@ static LRESULT UPDOWN_KeyPressed(UPDOWN_INFO *infoPtr, int key)
static
LRESULT
CALLBACK
UPDOWN_Buddy_SubclassProc
(
HWND
hwnd
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
WNDPROC
superClassWndProc
=
(
WNDPROC
)
GetProp
A
(
hwnd
,
BUDDY_SUPERCLASS_WNDPROC
);
WNDPROC
superClassWndProc
=
(
WNDPROC
)
GetProp
W
(
hwnd
,
BUDDY_SUPERCLASS_WNDPROC
);
TRACE
(
"hwnd=%p, wndProc=%d, uMsg=%04x, wParam=%d, lParam=%d
\n
"
,
hwnd
,
(
INT
)
superClassWndProc
,
uMsg
,
wParam
,
(
UINT
)
lParam
);
if
(
uMsg
==
WM_KEYDOWN
)
{
HWND
upDownHwnd
=
GetProp
A
(
hwnd
,
BUDDY_UPDOWN_HWND
);
HWND
upDownHwnd
=
GetProp
W
(
hwnd
,
BUDDY_UPDOWN_HWND
);
UPDOWN_KeyPressed
(
UPDOWN_GetInfoPtr
(
upDownHwnd
),
(
int
)
wParam
);
}
...
...
@@ -452,11 +452,13 @@ UPDOWN_Buddy_SubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
*/
static
HWND
UPDOWN_SetBuddy
(
UPDOWN_INFO
*
infoPtr
,
HWND
bud
)
{
static
const
WCHAR
editW
[]
=
{
'E'
,
'd'
,
'i'
,
't'
,
0
};
static
const
WCHAR
listboxW
[]
=
{
'L'
,
'i'
,
's'
,
't'
,
'b'
,
'o'
,
'x'
,
0
};
DWORD
dwStyle
=
GetWindowLongW
(
infoPtr
->
Self
,
GWL_STYLE
);
RECT
budRect
;
/* new coord for the buddy */
int
x
,
width
;
/* new x position and width for the up-down */
WNDPROC
baseWndProc
;
CHAR
buddyClass
[
40
];
W
CHAR
buddyClass
[
40
];
HWND
ret
;
TRACE
(
"(hwnd=%p, bud=%p)
\n
"
,
infoPtr
->
Self
,
bud
);
...
...
@@ -464,7 +466,7 @@ static HWND UPDOWN_SetBuddy (UPDOWN_INFO* infoPtr, HWND bud)
ret
=
infoPtr
->
Buddy
;
/* there is already a body assigned */
if
(
infoPtr
->
Buddy
)
RemoveProp
A
(
infoPtr
->
Buddy
,
BUDDY_UPDOWN_HWND
);
if
(
infoPtr
->
Buddy
)
RemoveProp
W
(
infoPtr
->
Buddy
,
BUDDY_UPDOWN_HWND
);
if
(
!
IsWindow
(
bud
))
bud
=
0
;
...
...
@@ -475,14 +477,14 @@ static HWND UPDOWN_SetBuddy (UPDOWN_INFO* infoPtr, HWND bud)
if
(
bud
)
{
/* keep upDown ctrl hwnd in a buddy property */
SetProp
A
(
bud
,
BUDDY_UPDOWN_HWND
,
infoPtr
->
Self
);
SetProp
W
(
bud
,
BUDDY_UPDOWN_HWND
,
infoPtr
->
Self
);
/* Store buddy window class type */
infoPtr
->
BuddyType
=
BUDDY_TYPE_UNKNOWN
;
if
(
GetClassName
A
(
bud
,
buddyClass
,
COUNT_OF
(
buddyClass
)))
{
if
(
lstrcmpi
A
(
buddyClass
,
"E
dit
"
)
==
0
)
if
(
GetClassName
W
(
bud
,
buddyClass
,
COUNT_OF
(
buddyClass
)))
{
if
(
lstrcmpi
W
(
buddyClass
,
e
dit
W
)
==
0
)
infoPtr
->
BuddyType
=
BUDDY_TYPE_EDIT
;
else
if
(
lstrcmpi
A
(
buddyClass
,
"L
istbox
"
)
==
0
)
else
if
(
lstrcmpi
W
(
buddyClass
,
l
istbox
W
)
==
0
)
infoPtr
->
BuddyType
=
BUDDY_TYPE_LISTBOX
;
}
...
...
@@ -490,9 +492,9 @@ static HWND UPDOWN_SetBuddy (UPDOWN_INFO* infoPtr, HWND bud)
/* Note that I don't clear the BUDDY_SUPERCLASS_WNDPROC property
when we reset the upDown ctrl buddy to another buddy because it is not
good to break the window proc chain. */
if
(
!
GetProp
A
(
bud
,
BUDDY_SUPERCLASS_WNDPROC
))
{
if
(
!
GetProp
W
(
bud
,
BUDDY_SUPERCLASS_WNDPROC
))
{
baseWndProc
=
(
WNDPROC
)
SetWindowLongPtrW
(
bud
,
GWLP_WNDPROC
,
(
LPARAM
)
UPDOWN_Buddy_SubclassProc
);
SetProp
A
(
bud
,
BUDDY_SUPERCLASS_WNDPROC
,
(
HANDLE
)
baseWndProc
);
SetProp
W
(
bud
,
BUDDY_SUPERCLASS_WNDPROC
,
(
HANDLE
)
baseWndProc
);
}
}
...
...
@@ -710,8 +712,7 @@ static void UPDOWN_HandleMouseEvent (UPDOWN_INFO *infoPtr, UINT msg, POINTS pts)
/***********************************************************************
* UpDownWndProc
*/
static
LRESULT
WINAPI
UpDownWindowProc
(
HWND
hwnd
,
UINT
message
,
WPARAM
wParam
,
LPARAM
lParam
)
static
LRESULT
WINAPI
UpDownWindowProc
(
HWND
hwnd
,
UINT
message
,
WPARAM
wParam
,
LPARAM
lParam
)
{
UPDOWN_INFO
*
infoPtr
=
UPDOWN_GetInfoPtr
(
hwnd
);
DWORD
dwStyle
=
GetWindowLongW
(
hwnd
,
GWL_STYLE
);
...
...
@@ -750,7 +751,7 @@ static LRESULT WINAPI UpDownWindowProc(HWND hwnd, UINT message, WPARAM wParam,
case
WM_DESTROY
:
if
(
infoPtr
->
AccelVect
)
Free
(
infoPtr
->
AccelVect
);
if
(
infoPtr
->
Buddy
)
RemoveProp
A
(
infoPtr
->
Buddy
,
BUDDY_UPDOWN_HWND
);
if
(
infoPtr
->
Buddy
)
RemoveProp
W
(
infoPtr
->
Buddy
,
BUDDY_UPDOWN_HWND
);
Free
(
infoPtr
);
SetWindowLongPtrW
(
hwnd
,
0
,
0
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment