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
fcc148b2
Commit
fcc148b2
authored
Jan 04, 2002
by
Sander van Leeuwen
Committed by
Alexandre Julliard
Jan 04, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Never delete the font object received by WM_SETFONT.
parent
198f1e2f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
6 deletions
+9
-6
comboex.c
dlls/comctl32/comboex.c
+3
-2
rebar.c
dlls/comctl32/rebar.c
+3
-2
toolbar.c
dlls/comctl32/toolbar.c
+3
-2
No files found.
dlls/comctl32/comboex.c
View file @
fcc148b2
...
@@ -120,6 +120,7 @@ typedef struct
...
@@ -120,6 +120,7 @@ typedef struct
DWORD
dwExtStyle
;
DWORD
dwExtStyle
;
INT
selected
;
/* index of selected item */
INT
selected
;
/* index of selected item */
DWORD
flags
;
/* WINE internal flags */
DWORD
flags
;
/* WINE internal flags */
HFONT
hDefaultFont
;
HFONT
font
;
HFONT
font
;
INT
nb_items
;
/* Number of items */
INT
nb_items
;
/* Number of items */
BOOL
bUnicode
;
/* TRUE if this window is Unicode */
BOOL
bUnicode
;
/* TRUE if this window is Unicode */
...
@@ -1209,7 +1210,7 @@ COMBOEX_Create (HWND hwnd, WPARAM wParam, LPARAM lParam)
...
@@ -1209,7 +1210,7 @@ COMBOEX_Create (HWND hwnd, WPARAM wParam, LPARAM lParam)
if
(
!
infoPtr
->
font
)
{
if
(
!
infoPtr
->
font
)
{
SystemParametersInfoA
(
SPI_GETICONTITLELOGFONT
,
sizeof
(
mylogfont
),
SystemParametersInfoA
(
SPI_GETICONTITLELOGFONT
,
sizeof
(
mylogfont
),
&
mylogfont
,
0
);
&
mylogfont
,
0
);
infoPtr
->
font
=
CreateFontIndirectA
(
&
mylogfont
);
infoPtr
->
font
=
infoPtr
->
hDefaultFont
=
CreateFontIndirectA
(
&
mylogfont
);
}
}
SendMessageW
(
infoPtr
->
hwndCombo
,
WM_SETFONT
,
(
WPARAM
)
infoPtr
->
font
,
0
);
SendMessageW
(
infoPtr
->
hwndCombo
,
WM_SETFONT
,
(
WPARAM
)
infoPtr
->
font
,
0
);
if
(
infoPtr
->
hwndEdit
)
{
if
(
infoPtr
->
hwndEdit
)
{
...
@@ -1750,7 +1751,7 @@ COMBOEX_Destroy (HWND hwnd, WPARAM wParam, LPARAM lParam)
...
@@ -1750,7 +1751,7 @@ COMBOEX_Destroy (HWND hwnd, WPARAM wParam, LPARAM lParam)
}
}
}
}
DeleteObject
(
infoPtr
->
f
ont
);
if
(
infoPtr
->
hDefaultFont
)
DeleteObject
(
infoPtr
->
hDefaultF
ont
);
/* free comboex info data */
/* free comboex info data */
COMCTL32_Free
(
infoPtr
);
COMCTL32_Free
(
infoPtr
);
...
...
dlls/comctl32/rebar.c
View file @
fcc148b2
...
@@ -200,6 +200,7 @@ typedef struct
...
@@ -200,6 +200,7 @@ typedef struct
HWND
hwndSelf
;
/* handle of REBAR window itself */
HWND
hwndSelf
;
/* handle of REBAR window itself */
HWND
hwndToolTip
;
/* handle to the tool tip control */
HWND
hwndToolTip
;
/* handle to the tool tip control */
HWND
hwndNotify
;
/* notification window (parent) */
HWND
hwndNotify
;
/* notification window (parent) */
HFONT
hDefaultFont
;
HFONT
hFont
;
/* handle to the rebar's font */
HFONT
hFont
;
/* handle to the rebar's font */
SIZE
imageSize
;
/* image size (image list) */
SIZE
imageSize
;
/* image size (image list) */
DWORD
dwStyle
;
/* window style */
DWORD
dwStyle
;
/* window style */
...
@@ -3624,7 +3625,7 @@ REBAR_Destroy (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
...
@@ -3624,7 +3625,7 @@ REBAR_Destroy (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
DeleteObject
(
infoPtr
->
hcurHorz
);
DeleteObject
(
infoPtr
->
hcurHorz
);
DeleteObject
(
infoPtr
->
hcurVert
);
DeleteObject
(
infoPtr
->
hcurVert
);
DeleteObject
(
infoPtr
->
hcurDrag
);
DeleteObject
(
infoPtr
->
hcurDrag
);
DeleteObject
(
infoPtr
->
h
Font
);
if
(
infoPtr
->
hDefaultFont
)
DeleteObject
(
infoPtr
->
hDefault
Font
);
SetWindowLongA
(
infoPtr
->
hwndSelf
,
0
,
0
);
SetWindowLongA
(
infoPtr
->
hwndSelf
,
0
,
0
);
/* free rebar info data */
/* free rebar info data */
...
@@ -3834,7 +3835,7 @@ REBAR_NCCreate (HWND hwnd, WPARAM wParam, LPARAM lParam)
...
@@ -3834,7 +3835,7 @@ REBAR_NCCreate (HWND hwnd, WPARAM wParam, LPARAM lParam)
}
}
tfont
=
CreateFontIndirectA
(
&
ncm
.
lfCaptionFont
);
tfont
=
CreateFontIndirectA
(
&
ncm
.
lfCaptionFont
);
if
(
tfont
)
{
if
(
tfont
)
{
infoPtr
->
h
Font
=
tfont
;
infoPtr
->
hFont
=
infoPtr
->
hDefault
Font
=
tfont
;
}
}
/* native does:
/* native does:
...
...
dlls/comctl32/toolbar.c
View file @
fcc148b2
...
@@ -95,6 +95,7 @@ typedef struct
...
@@ -95,6 +95,7 @@ typedef struct
INT
nButtonDown
;
INT
nButtonDown
;
INT
nOldHit
;
INT
nOldHit
;
INT
nHotItem
;
/* index of the "hot" item */
INT
nHotItem
;
/* index of the "hot" item */
HFONT
hDefaultFont
;
HFONT
hFont
;
/* text font */
HFONT
hFont
;
/* text font */
HIMAGELIST
himlInt
;
/* image list created internally */
HIMAGELIST
himlInt
;
/* image list created internally */
HIMAGELIST
himlDef
;
/* default image list */
HIMAGELIST
himlDef
;
/* default image list */
...
@@ -4048,7 +4049,7 @@ TOOLBAR_Create (HWND hwnd, WPARAM wParam, LPARAM lParam)
...
@@ -4048,7 +4049,7 @@ TOOLBAR_Create (HWND hwnd, WPARAM wParam, LPARAM lParam)
infoPtr
->
hwndSelf
=
hwnd
;
infoPtr
->
hwndSelf
=
hwnd
;
SystemParametersInfoA
(
SPI_GETICONTITLELOGFONT
,
0
,
&
logFont
,
0
);
SystemParametersInfoA
(
SPI_GETICONTITLELOGFONT
,
0
,
&
logFont
,
0
);
infoPtr
->
hFont
=
CreateFontIndirectA
(
&
logFont
);
infoPtr
->
hFont
=
infoPtr
->
hDefaultFont
=
CreateFontIndirectA
(
&
logFont
);
if
(
dwStyle
&
TBSTYLE_TOOLTIPS
)
{
if
(
dwStyle
&
TBSTYLE_TOOLTIPS
)
{
/* Create tooltip control */
/* Create tooltip control */
...
@@ -4106,7 +4107,7 @@ TOOLBAR_Destroy (HWND hwnd, WPARAM wParam, LPARAM lParam)
...
@@ -4106,7 +4107,7 @@ TOOLBAR_Destroy (HWND hwnd, WPARAM wParam, LPARAM lParam)
/* delete default font */
/* delete default font */
if
(
infoPtr
->
hFont
)
if
(
infoPtr
->
hFont
)
DeleteObject
(
infoPtr
->
hFont
);
DeleteObject
(
infoPtr
->
h
Default
Font
);
/* free toolbar info data */
/* free toolbar info data */
COMCTL32_Free
(
infoPtr
);
COMCTL32_Free
(
infoPtr
);
...
...
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