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
Releases
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
Sam Joan Roque-Worcel
wine
Commits
d3eb0550
Commit
d3eb0550
authored
20 years ago
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
20 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Convert NativeFont control to unicode, use hbrBackground as in native.
parent
5656ca0d
Branches
Branches containing commit
Tags
wine-951003
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/comctl32/nativefont.c
+25
-31
25 additions, 31 deletions
dlls/comctl32/nativefont.c
with
25 additions
and
31 deletions
dlls/comctl32/nativefont.c
+
25
−
31
View file @
d3eb0550
...
...
@@ -28,12 +28,11 @@
*/
#include
<stdarg.h>
#include
<string.h>
#include
"windef.h"
#include
"winbase.h"
#include
"wingdi.h"
#include
"winuser.h"
#include
"winnls.h"
#include
"commctrl.h"
#include
"comctl32.h"
#include
"wine/debug.h"
...
...
@@ -42,12 +41,11 @@ WINE_DEFAULT_DEBUG_CHANNEL(nativefont);
typedef
struct
{
DWORD
dwDummy
;
/* just to keep the compiler happy ;-)
*/
HWND
hwndSelf
;
/* my own handle
*/
}
NATIVEFONT_INFO
;
#define NATIVEFONT_GetInfoPtr(hwnd) ((NATIVEFONT_INFO *)GetWindowLongPtrW (hwnd, 0))
static
LRESULT
NATIVEFONT_Create
(
HWND
hwnd
,
WPARAM
wParam
,
LPARAM
lParam
)
{
...
...
@@ -57,45 +55,40 @@ NATIVEFONT_Create (HWND hwnd, WPARAM wParam, LPARAM lParam)
infoPtr
=
(
NATIVEFONT_INFO
*
)
Alloc
(
sizeof
(
NATIVEFONT_INFO
));
SetWindowLongPtrW
(
hwnd
,
0
,
(
DWORD_PTR
)
infoPtr
);
/* initialize info structure */
infoPtr
->
hwndSelf
=
hwnd
;
return
0
;
}
static
LRESULT
NATIVEFONT_Destroy
(
HWND
hwnd
,
WPARAM
wParam
,
LPARAM
lParam
)
NATIVEFONT_Destroy
(
NATIVEFONT_INFO
*
infoPtr
)
{
NATIVEFONT_INFO
*
infoPtr
=
NATIVEFONT_GetInfoPtr
(
hwnd
);
/* free comboex info data */
/* free control info data */
SetWindowLongPtrW
(
infoPtr
->
hwndSelf
,
0
,
0
);
Free
(
infoPtr
);
SetWindowLongPtrW
(
hwnd
,
0
,
0
);
return
0
;
}
static
LRESULT
WINAPI
NATIVEFONT_WindowProc
(
HWND
hwnd
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
if
(
!
NATIVEFONT_GetInfoPtr
(
hwnd
)
&&
(
uMsg
!=
WM_CREATE
))
return
DefWindowProcA
(
hwnd
,
uMsg
,
wParam
,
lParam
);
NATIVEFONT_INFO
*
infoPtr
=
NATIVEFONT_GetInfoPtr
(
hwnd
);
TRACE
(
"hwnd=%p msg=%04x wparam=%08x lparam=%08lx
\n
"
,
hwnd
,
uMsg
,
wParam
,
lParam
);
if
(
!
infoPtr
&&
(
uMsg
!=
WM_CREATE
))
return
DefWindowProcW
(
hwnd
,
uMsg
,
wParam
,
lParam
);
switch
(
uMsg
)
{
case
WM_CREATE
:
return
NATIVEFONT_Create
(
hwnd
,
wParam
,
lParam
);
case
WM_DESTROY
:
return
NATIVEFONT_Destroy
(
hwnd
,
wParam
,
lParam
);
return
NATIVEFONT_Destroy
(
infoPtr
);
case
WM_MOVE
:
case
WM_SIZE
:
...
...
@@ -105,12 +98,13 @@ NATIVEFONT_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
case
WM_SETFONT
:
case
WM_GETDLGCODE
:
/* FIXME("message %04x seen but stubbed\n", uMsg); */
return
DefWindowProc
A
(
hwnd
,
uMsg
,
wParam
,
lParam
);
return
DefWindowProc
W
(
hwnd
,
uMsg
,
wParam
,
lParam
);
default:
ERR
(
"unknown msg %04x wp=%08x lp=%08lx
\n
"
,
if
((
uMsg
>=
WM_USER
)
&&
(
uMsg
<
WM_APP
))
ERR
(
"unknown msg %04x wp=%08x lp=%08lx
\n
"
,
uMsg
,
wParam
,
lParam
);
return
DefWindowProc
A
(
hwnd
,
uMsg
,
wParam
,
lParam
);
return
DefWindowProc
W
(
hwnd
,
uMsg
,
wParam
,
lParam
);
}
return
0
;
}
...
...
@@ -119,23 +113,23 @@ NATIVEFONT_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
VOID
NATIVEFONT_Register
(
void
)
{
WNDCLASS
A
wndClass
;
WNDCLASS
W
wndClass
;
ZeroMemory
(
&
wndClass
,
sizeof
(
WNDCLASS
A
));
ZeroMemory
(
&
wndClass
,
sizeof
(
WNDCLASS
W
));
wndClass
.
style
=
CS_GLOBALCLASS
;
wndClass
.
lpfnWndProc
=
(
WNDPROC
)
NATIVEFONT_WindowProc
;
wndClass
.
cbClsExtra
=
0
;
wndClass
.
cbWndExtra
=
sizeof
(
NATIVEFONT_INFO
*
);
wndClass
.
hCursor
=
LoadCursor
A
(
0
,
(
LPSTR
)
IDC_ARROW
);
wndClass
.
hbrBackground
=
(
HBRUSH
)(
COLOR_
WINDOW
+
1
);
wndClass
.
lpszClassName
=
WC_NATIVEFONTCTL
A
;
wndClass
.
hCursor
=
LoadCursor
W
(
0
,
(
LP
W
STR
)
IDC_ARROW
);
wndClass
.
hbrBackground
=
(
HBRUSH
)(
COLOR_
BTNFACE
+
1
);
wndClass
.
lpszClassName
=
WC_NATIVEFONTCTL
W
;
RegisterClass
A
(
&
wndClass
);
RegisterClass
W
(
&
wndClass
);
}
VOID
NATIVEFONT_Unregister
(
void
)
{
UnregisterClass
A
(
WC_NATIVEFONTCTL
A
,
NULL
);
UnregisterClass
W
(
WC_NATIVEFONTCTL
W
,
NULL
);
}
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