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
fbfb165d
Commit
fbfb165d
authored
Oct 09, 2008
by
Andrey Turkin
Committed by
Alexandre Julliard
Oct 10, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wordpad: Fix some compile-time warnings.
parent
c53b7723
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
13 deletions
+13
-13
print.c
programs/wordpad/print.c
+3
-3
registry.c
programs/wordpad/registry.c
+4
-4
wordpad.c
programs/wordpad/wordpad.c
+6
-6
No files found.
programs/wordpad/print.c
View file @
fbfb165d
...
...
@@ -135,7 +135,7 @@ static LONG twips_to_centmm(int twips)
return
MulDiv
(
twips
,
1000
,
TWIPS_PER_CM
);
}
LONG
centmm_to_twips
(
int
mm
)
static
LONG
centmm_to_twips
(
int
mm
)
{
return
MulDiv
(
mm
,
TWIPS_PER_CM
,
1000
);
}
...
...
@@ -620,7 +620,7 @@ LRESULT CALLBACK ruler_proc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
return
0
;
}
void
draw_preview_page
(
HDC
hdc
,
HDC
*
hdcSized
,
FORMATRANGE
*
lpFr
,
float
ratio
,
int
bmNewWidth
,
int
bmNewHeight
,
int
bmWidth
,
int
bmHeight
)
static
void
draw_preview_page
(
HDC
hdc
,
HDC
*
hdcSized
,
FORMATRANGE
*
lpFr
,
float
ratio
,
int
bmNewWidth
,
int
bmNewHeight
,
int
bmWidth
,
int
bmHeight
)
{
HBITMAP
hBitmapScaled
=
CreateCompatibleBitmap
(
hdc
,
bmNewWidth
,
bmNewHeight
);
HPEN
hPen
;
...
...
@@ -800,7 +800,7 @@ LRESULT print_preview(HWND hMainWnd)
return
0
;
}
void
update_preview
(
HWND
hWnd
)
static
void
update_preview
(
HWND
hWnd
)
{
RECT
rc
;
...
...
programs/wordpad/registry.c
View file @
fbfb165d
...
...
@@ -81,7 +81,7 @@ void registry_set_options(HWND hMainWnd)
HKEY
hKey
;
DWORD
action
;
if
(
registry_get_handle
(
&
hKey
,
&
action
,
(
LPWSTR
)
key_options
)
==
ERROR_SUCCESS
)
if
(
registry_get_handle
(
&
hKey
,
&
action
,
key_options
)
==
ERROR_SUCCESS
)
{
WINDOWPLACEMENT
wp
;
DWORD
isMaximized
;
...
...
@@ -104,7 +104,7 @@ void registry_read_winrect(RECT* rc)
HKEY
hKey
;
DWORD
size
=
sizeof
(
RECT
);
if
(
registry_get_handle
(
&
hKey
,
0
,
(
LPWSTR
)
key_options
)
!=
ERROR_SUCCESS
||
if
(
registry_get_handle
(
&
hKey
,
0
,
key_options
)
!=
ERROR_SUCCESS
||
RegQueryValueExW
(
hKey
,
var_framerect
,
0
,
NULL
,
(
LPBYTE
)
rc
,
&
size
)
!=
ERROR_SUCCESS
||
size
!=
sizeof
(
RECT
))
{
...
...
@@ -122,7 +122,7 @@ void registry_read_maximized(DWORD *bMaximized)
HKEY
hKey
;
DWORD
size
=
sizeof
(
DWORD
);
if
(
registry_get_handle
(
&
hKey
,
0
,
(
LPWSTR
)
key_options
)
!=
ERROR_SUCCESS
||
if
(
registry_get_handle
(
&
hKey
,
0
,
key_options
)
!=
ERROR_SUCCESS
||
RegQueryValueExW
(
hKey
,
var_maximized
,
0
,
NULL
,
(
LPBYTE
)
bMaximized
,
&
size
)
!=
ERROR_SUCCESS
||
size
!=
sizeof
(
DWORD
))
{
...
...
@@ -314,7 +314,7 @@ void registry_set_filelist(LPCWSTR newFile, HWND hMainWnd)
for
(
i
=
0
;
pFiles
[
i
]
&&
i
<
FILELIST_ENTRIES
;
i
++
)
{
wsprintfW
(
buffer
,
var_file
,
i
+
1
);
RegSetValueExW
(
hKey
,
(
LPWSTR
)
&
buffer
,
0
,
REG_SZ
,
(
LPBYTE
)
pFiles
[
i
],
RegSetValueExW
(
hKey
,
(
LPWSTR
)
&
buffer
,
0
,
REG_SZ
,
(
const
BYTE
*
)
pFiles
[
i
],
(
lstrlenW
(
pFiles
[
i
])
+
1
)
*
sizeof
(
WCHAR
));
}
}
...
...
programs/wordpad/wordpad.c
View file @
fbfb165d
...
...
@@ -317,7 +317,7 @@ static void populate_size_list(HWND hSizeListWnd)
HDC
hdc
=
GetDC
(
hMainWnd
);
static
const
unsigned
choices
[]
=
{
8
,
9
,
10
,
11
,
12
,
14
,
16
,
18
,
20
,
22
,
24
,
26
,
28
,
36
,
48
,
72
};
WCHAR
buffer
[
3
];
in
t
i
;
size_
t
i
;
DWORD
fontStyle
;
ZeroMemory
(
&
fmt
,
sizeof
(
fmt
));
...
...
@@ -440,7 +440,7 @@ static void set_font(LPCWSTR wszFaceName)
populate_size_list
(
hSizeListWnd
);
SendMessageW
(
hFontListEditWnd
,
WM_SETTEXT
,
0
,
(
LPARAM
)
(
LPWSTR
)
wszFaceName
);
SendMessageW
(
hFontListEditWnd
,
WM_SETTEXT
,
0
,
(
LPARAM
)
wszFaceName
);
}
static
void
set_default_font
(
void
)
...
...
@@ -478,7 +478,7 @@ static void on_fontlist_modified(LPWSTR wszNewFaceName)
set_font
((
LPCWSTR
)
wszNewFaceName
);
}
static
void
add_font
(
LPCWSTR
fontName
,
DWORD
fontType
,
HWND
hListWnd
,
NEWTEXTMETRICEXW
*
ntmc
)
static
void
add_font
(
LPCWSTR
fontName
,
DWORD
fontType
,
HWND
hListWnd
,
const
NEWTEXTMETRICEXW
*
ntmc
)
{
COMBOBOXEXITEMW
cbItem
;
WCHAR
buffer
[
MAX_PATH
];
...
...
@@ -557,7 +557,7 @@ static void dialog_choose_font(void)
}
int
CALLBACK
enum_font_proc
(
const
LOGFONTW
*
lpelfe
,
const
TEXTMETRICW
*
lpntme
,
static
int
CALLBACK
enum_font_proc
(
const
LOGFONTW
*
lpelfe
,
const
TEXTMETRICW
*
lpntme
,
DWORD
FontType
,
LPARAM
lParam
)
{
HWND
hListWnd
=
(
HWND
)
lParam
;
...
...
@@ -565,7 +565,7 @@ int CALLBACK enum_font_proc(const LOGFONTW *lpelfe, const TEXTMETRICW *lpntme,
if
(
SendMessageW
(
hListWnd
,
CB_FINDSTRINGEXACT
,
-
1
,
(
LPARAM
)
lpelfe
->
lfFaceName
)
==
CB_ERR
)
{
add_font
(
(
LPWSTR
)
lpelfe
->
lfFaceName
,
FontType
,
hListWnd
,
(
NEWTEXTMETRICEXW
*
)
lpntme
);
add_font
(
lpelfe
->
lfFaceName
,
FontType
,
hListWnd
,
(
const
NEWTEXTMETRICEXW
*
)
lpntme
);
}
return
1
;
...
...
@@ -1061,7 +1061,7 @@ static void dialog_viewproperties(void)
{
PROPSHEETPAGEW
psp
[
2
];
PROPSHEETHEADERW
psh
;
in
t
i
;
size_
t
i
;
HINSTANCE
hInstance
=
(
HINSTANCE
)
GetWindowLongPtr
(
hMainWnd
,
GWLP_HINSTANCE
);
LPCPROPSHEETPAGEW
ppsp
=
(
LPCPROPSHEETPAGEW
)
&
psp
;
...
...
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