Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
f2fe53d6
Commit
f2fe53d6
authored
Jan 20, 2012
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wordpad: Avoid Unicode macros.
parent
aef2eeea
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
32 deletions
+31
-32
Makefile.in
programs/wordpad/Makefile.in
+1
-1
print.c
programs/wordpad/print.c
+2
-2
wordpad.c
programs/wordpad/wordpad.c
+28
-29
No files found.
programs/wordpad/Makefile.in
View file @
f2fe53d6
...
...
@@ -2,7 +2,7 @@ MODULE = wordpad.exe
APPMODE
=
-mwindows
-mno-cygwin
IMPORTS
=
comdlg32 uuid ole32 shell32 user32 gdi32 advapi32 comctl32
EXTRAINCL
=
-I
$(top_srcdir)
/include/msvcrt
EXTRADEFS
=
-DNO_LIBWINE_PORT
EXTRADEFS
=
-DNO_LIBWINE_PORT
-DWINE_NO_UNICODE_MACROS
MODCFLAGS
=
@BUILTINFLAG@
C_SRCS
=
\
...
...
programs/wordpad/print.c
View file @
f2fe53d6
...
...
@@ -138,7 +138,7 @@ static void AddTextButton(HWND hRebarWnd, UINT string, UINT command, UINT id)
rb
.
cxIdeal
=
100
;
rb
.
wID
=
id
;
SendMessageW
(
hRebarWnd
,
RB_INSERTBAND
,
-
1
,
(
LPARAM
)
&
rb
);
SendMessageW
(
hRebarWnd
,
RB_INSERTBAND
W
,
-
1
,
(
LPARAM
)
&
rb
);
}
static
HDC
make_dc
(
void
)
...
...
@@ -620,7 +620,7 @@ static void preview_bar_show(HWND hMainWnd, BOOL show)
rb
.
cxIdeal
=
100
;
rb
.
wID
=
BANDID_PREVIEW_BUFFER
;
SendMessageW
(
hReBar
,
RB_INSERTBAND
,
-
1
,
(
LPARAM
)
&
rb
);
SendMessageW
(
hReBar
,
RB_INSERTBAND
W
,
-
1
,
(
LPARAM
)
&
rb
);
}
else
{
for
(
i
=
0
;
i
<=
PREVIEW_BUTTONS
;
i
++
)
...
...
programs/wordpad/wordpad.c
View file @
f2fe53d6
...
...
@@ -686,14 +686,14 @@ static void set_toolbar_state(int bandId, BOOL show)
rbbinfo
.
cbSize
=
REBARBANDINFOW_V6_SIZE
;
rbbinfo
.
fMask
=
RBBIM_STYLE
;
SendMessageW
(
hwndReBar
,
RB_GETBANDINFO
,
index
,
(
LPARAM
)
&
rbbinfo
);
SendMessageW
(
hwndReBar
,
RB_GETBANDINFO
W
,
index
,
(
LPARAM
)
&
rbbinfo
);
if
(
!
show
)
rbbinfo
.
fStyle
&=
~
RBBS_BREAK
;
else
rbbinfo
.
fStyle
|=
RBBS_BREAK
;
SendMessageW
(
hwndReBar
,
RB_SETBANDINFO
,
index
,
(
LPARAM
)
&
rbbinfo
);
SendMessageW
(
hwndReBar
,
RB_SETBANDINFO
W
,
index
,
(
LPARAM
)
&
rbbinfo
);
}
if
(
bandId
==
BANDID_TOOLBAR
||
bandId
==
BANDID_FORMATBAR
||
bandId
==
BANDID_RULER
)
...
...
@@ -1396,15 +1396,15 @@ static BOOL get_comboexlist_selection(HWND hComboEx, LPWSTR wszBuffer, UINT buff
HWND
hCombo
,
hList
;
int
idx
,
result
;
hCombo
=
(
HWND
)
SendMessage
(
hComboEx
,
CBEM_GETCOMBOCONTROL
,
0
,
0
);
hCombo
=
(
HWND
)
SendMessage
W
(
hComboEx
,
CBEM_GETCOMBOCONTROL
,
0
,
0
);
if
(
!
hCombo
)
return
FALSE
;
cbInfo
.
cbSize
=
sizeof
(
COMBOBOXINFO
);
result
=
SendMessage
(
hCombo
,
CB_GETCOMBOBOXINFO
,
0
,
(
LPARAM
)
&
cbInfo
);
result
=
SendMessage
W
(
hCombo
,
CB_GETCOMBOBOXINFO
,
0
,
(
LPARAM
)
&
cbInfo
);
if
(
!
result
)
return
FALSE
;
hList
=
cbInfo
.
hwndList
;
idx
=
SendMessage
(
hList
,
LB_GETCURSEL
,
0
,
0
);
idx
=
SendMessage
W
(
hList
,
LB_GETCURSEL
,
0
,
0
);
if
(
idx
<
0
)
return
FALSE
;
...
...
@@ -1709,7 +1709,7 @@ static INT_PTR CALLBACK tabstops_proc(HWND hWnd, UINT message, WPARAM wParam, LP
if
(
SendMessageW
(
hTabWnd
,
CB_FINDSTRINGEXACT
,
-
1
,
(
LPARAM
)
&
buffer
)
==
CB_ERR
)
{
float
number
=
0
;
int
item_count
=
SendMessage
(
hTabWnd
,
CB_GETCOUNT
,
0
,
0
);
int
item_count
=
SendMessage
W
(
hTabWnd
,
CB_GETCOUNT
,
0
,
0
);
if
(
!
number_from_string
(
buffer
,
&
number
,
&
unit
))
{
...
...
@@ -1856,7 +1856,7 @@ static LRESULT OnCreate( HWND hWnd )
rbb
.
cyChild
=
rbb
.
cyMinChild
=
HIWORD
(
SendMessageW
(
hToolBarWnd
,
TB_GETBUTTONSIZE
,
0
,
0
));
rbb
.
wID
=
BANDID_TOOLBAR
;
SendMessageW
(
hReBarWnd
,
RB_INSERTBAND
,
-
1
,
(
LPARAM
)
&
rbb
);
SendMessageW
(
hReBarWnd
,
RB_INSERTBAND
W
,
-
1
,
(
LPARAM
)
&
rbb
);
hFontListWnd
=
CreateWindowExW
(
0
,
WC_COMBOBOXEXW
,
NULL
,
WS_BORDER
|
WS_VISIBLE
|
WS_CHILD
|
CBS_DROPDOWN
|
CBS_SORT
,
...
...
@@ -1866,7 +1866,7 @@ static LRESULT OnCreate( HWND hWnd )
rbb
.
cx
=
200
;
rbb
.
wID
=
BANDID_FONTLIST
;
SendMessageW
(
hReBarWnd
,
RB_INSERTBAND
,
-
1
,
(
LPARAM
)
&
rbb
);
SendMessageW
(
hReBarWnd
,
RB_INSERTBAND
W
,
-
1
,
(
LPARAM
)
&
rbb
);
hSizeListWnd
=
CreateWindowExW
(
0
,
WC_COMBOBOXEXW
,
NULL
,
WS_BORDER
|
WS_VISIBLE
|
WS_CHILD
|
CBS_DROPDOWN
,
...
...
@@ -1877,7 +1877,7 @@ static LRESULT OnCreate( HWND hWnd )
rbb
.
fStyle
^=
RBBS_BREAK
;
rbb
.
wID
=
BANDID_SIZELIST
;
SendMessageW
(
hReBarWnd
,
RB_INSERTBAND
,
-
1
,
(
LPARAM
)
&
rbb
);
SendMessageW
(
hReBarWnd
,
RB_INSERTBAND
W
,
-
1
,
(
LPARAM
)
&
rbb
);
hFormatBarWnd
=
CreateToolbarEx
(
hReBarWnd
,
CCS_NOPARENTALIGN
|
CCS_NOMOVEY
|
WS_VISIBLE
|
TBSTYLE_TOOLTIPS
|
BTNS_BUTTON
,
...
...
@@ -1899,7 +1899,7 @@ static LRESULT OnCreate( HWND hWnd )
rbb
.
hwndChild
=
hFormatBarWnd
;
rbb
.
wID
=
BANDID_FORMATBAR
;
SendMessageW
(
hReBarWnd
,
RB_INSERTBAND
,
-
1
,
(
LPARAM
)
&
rbb
);
SendMessageW
(
hReBarWnd
,
RB_INSERTBAND
W
,
-
1
,
(
LPARAM
)
&
rbb
);
hRulerWnd
=
CreateWindowExW
(
0
,
WC_STATICW
,
NULL
,
WS_VISIBLE
|
WS_CHILD
,
0
,
0
,
200
,
10
,
hReBarWnd
,
(
HMENU
)
IDC_RULER
,
hInstance
,
NULL
);
...
...
@@ -1909,7 +1909,7 @@ static LRESULT OnCreate( HWND hWnd )
rbb
.
wID
=
BANDID_RULER
;
rbb
.
fStyle
|=
RBBS_BREAK
;
SendMessageW
(
hReBarWnd
,
RB_INSERTBAND
,
-
1
,
(
LPARAM
)
&
rbb
);
SendMessageW
(
hReBarWnd
,
RB_INSERTBAND
W
,
-
1
,
(
LPARAM
)
&
rbb
);
hDLL
=
LoadLibraryW
(
wszRichEditDll
);
if
(
!
hDLL
)
...
...
@@ -2016,13 +2016,13 @@ static LRESULT OnNotify( HWND hWnd, LPARAM lParam)
{
if
(
pHdr
->
code
==
CBEN_ENDEDITW
)
{
NMCBEENDEDIT
*
endEdit
=
(
NMCBEENDEDIT
*
)
lParam
;
NMCBEENDEDIT
W
*
endEdit
=
(
NMCBEENDEDITW
*
)
lParam
;
if
(
pHdr
->
hwndFrom
==
hwndFontList
)
{
on_fontlist_modified
(
(
LPWSTR
)
endEdit
->
szText
);
on_fontlist_modified
(
endEdit
->
szText
);
}
else
if
(
pHdr
->
hwndFrom
==
hwndSizeList
)
{
on_sizelist_modified
(
hwndFontList
,
(
LPWSTR
)
endEdit
->
szText
);
on_sizelist_modified
(
hwndFontList
,
endEdit
->
szText
);
}
}
return
0
;
...
...
@@ -2040,9 +2040,9 @@ static LRESULT OnNotify( HWND hWnd, LPARAM lParam)
sprintf
(
buf
,
"selection = %d..%d, line count=%ld"
,
pSC
->
chrg
.
cpMin
,
pSC
->
chrg
.
cpMax
,
SendMessage
(
hwndEditor
,
EM_GETLINECOUNT
,
0
,
0
));
SendMessage
W
(
hwndEditor
,
EM_GETLINECOUNT
,
0
,
0
));
SetWindowTextA
(
GetDlgItem
(
hWnd
,
IDC_STATUSBAR
),
buf
);
SendMessage
(
hWnd
,
WM_USER
,
0
,
0
);
SendMessage
W
(
hWnd
,
WM_USER
,
0
,
0
);
return
1
;
}
return
0
;
...
...
@@ -2075,8 +2075,7 @@ static LRESULT OnCommand( HWND hWnd, WPARAM wParam, LPARAM lParam)
case
ID_FILE_NEW
:
{
HINSTANCE
hInstance
=
GetModuleHandleW
(
0
);
int
ret
=
DialogBox
(
hInstance
,
MAKEINTRESOURCE
(
IDD_NEWFILE
),
hWnd
,
newfile_proc
);
int
ret
=
DialogBoxW
(
hInstance
,
MAKEINTRESOURCEW
(
IDD_NEWFILE
),
hWnd
,
newfile_proc
);
if
(
ret
!=
ID_NEWFILE_ABORT
)
{
...
...
@@ -2216,9 +2215,9 @@ static LRESULT OnCommand( HWND hWnd, WPARAM wParam, LPARAM lParam)
RECT
itemrc
;
POINT
pt
;
int
mid
;
int
itemidx
=
SendMessage
(
hFormatBarWnd
,
TB_COMMANDTOINDEX
,
ID_FORMAT_COLOR
,
0
);
int
itemidx
=
SendMessage
W
(
hFormatBarWnd
,
TB_COMMANDTOINDEX
,
ID_FORMAT_COLOR
,
0
);
SendMessage
(
hFormatBarWnd
,
TB_GETITEMRECT
,
itemidx
,
(
LPARAM
)
&
itemrc
);
SendMessage
W
(
hFormatBarWnd
,
TB_GETITEMRECT
,
itemidx
,
(
LPARAM
)
&
itemrc
);
pt
.
x
=
itemrc
.
left
;
pt
.
y
=
itemrc
.
bottom
;
ClientToScreen
(
hFormatBarWnd
,
&
pt
);
...
...
@@ -2286,7 +2285,7 @@ static LRESULT OnCommand( HWND hWnd, WPARAM wParam, LPARAM lParam)
tr
.
chrg
.
cpMin
=
0
;
tr
.
chrg
.
cpMax
=
nLen
;
tr
.
lpstrText
=
data
;
SendMessage
(
hwndEditor
,
EM_GETTEXTRANGE
,
0
,
(
LPARAM
)
&
tr
);
SendMessage
W
(
hwndEditor
,
EM_GETTEXTRANGE
,
0
,
(
LPARAM
)
&
tr
);
MessageBoxW
(
NULL
,
data
,
wszAppTitle
,
MB_OK
);
HeapFree
(
GetProcessHeap
(),
0
,
data
);
...
...
@@ -2322,9 +2321,9 @@ static LRESULT OnCommand( HWND hWnd, WPARAM wParam, LPARAM lParam)
char
buf
[
128
];
WCHAR
*
data
=
NULL
;
SendMessage
(
hwndEditor
,
EM_EXGETSEL
,
0
,
(
LPARAM
)
&
range
);
SendMessage
W
(
hwndEditor
,
EM_EXGETSEL
,
0
,
(
LPARAM
)
&
range
);
data
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
data
)
*
(
range
.
cpMax
-
range
.
cpMin
+
1
));
SendMessage
(
hwndEditor
,
EM_GETSELTEXT
,
0
,
(
LPARAM
)
data
);
SendMessage
W
(
hwndEditor
,
EM_GETSELTEXT
,
0
,
(
LPARAM
)
data
);
sprintf
(
buf
,
"Start = %d, End = %d"
,
range
.
cpMin
,
range
.
cpMax
);
MessageBoxA
(
hWnd
,
buf
,
"Editor"
,
MB_OK
);
MessageBoxW
(
hWnd
,
data
,
wszAppTitle
,
MB_OK
);
...
...
@@ -2335,7 +2334,7 @@ static LRESULT OnCommand( HWND hWnd, WPARAM wParam, LPARAM lParam)
case
ID_EDIT_READONLY
:
{
LONG
nStyle
=
GetWindowLong
(
hwndEditor
,
GWL_STYLE
);
LONG
nStyle
=
GetWindowLong
W
(
hwndEditor
,
GWL_STYLE
);
if
(
nStyle
&
ES_READONLY
)
SendMessageW
(
hwndEditor
,
EM_SETREADONLY
,
0
,
0
);
else
...
...
@@ -2495,9 +2494,9 @@ static LRESULT OnInitPopupMenu( HWND hWnd, WPARAM wParam )
pf
.
cbSize
=
sizeof
(
PARAFORMAT
);
SendMessageW
(
hwndEditor
,
EM_GETPARAFORMAT
,
0
,
(
LPARAM
)
&
pf
);
CheckMenuItem
(
hMenu
,
ID_EDIT_READONLY
,
MF_BYCOMMAND
|
(
GetWindowLong
(
hwndEditor
,
GWL_STYLE
)
&
ES_READONLY
?
MF_CHECKED
:
MF_UNCHECKED
));
MF_BYCOMMAND
|
(
GetWindowLong
W
(
hwndEditor
,
GWL_STYLE
)
&
ES_READONLY
?
MF_CHECKED
:
MF_UNCHECKED
));
CheckMenuItem
(
hMenu
,
ID_EDIT_MODIFIED
,
MF_BYCOMMAND
|
(
SendMessage
(
hwndEditor
,
EM_GETMODIFY
,
0
,
0
)
?
MF_CHECKED
:
MF_UNCHECKED
));
MF_BYCOMMAND
|
(
SendMessage
W
(
hwndEditor
,
EM_GETMODIFY
,
0
,
0
)
?
MF_CHECKED
:
MF_UNCHECKED
));
if
(
pf
.
dwMask
&
PFM_ALIGNMENT
)
nAlignment
=
pf
.
wAlignment
;
CheckMenuItem
(
hMenu
,
ID_ALIGN_LEFT
,
MF_BYCOMMAND
|
(
nAlignment
==
PFA_LEFT
)
?
...
...
@@ -2683,7 +2682,7 @@ int CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE hOldInstance, LPSTR szCmdPar
wc
.
hIcon
=
LoadIconW
(
hInstance
,
MAKEINTRESOURCEW
(
IDI_WORDPAD
));
wc
.
hIconSm
=
LoadImageW
(
hInstance
,
MAKEINTRESOURCEW
(
IDI_WORDPAD
),
IMAGE_ICON
,
GetSystemMetrics
(
SM_CXSMICON
),
GetSystemMetrics
(
SM_CYSMICON
),
LR_SHARED
);
wc
.
hCursor
=
LoadCursor
(
NULL
,
IDC_IBEAM
);
wc
.
hCursor
=
LoadCursor
W
(
NULL
,
(
LPWSTR
)
IDC_IBEAM
);
wc
.
hbrBackground
=
GetSysColorBrush
(
COLOR_WINDOW
);
wc
.
lpszMenuName
=
MAKEINTRESOURCEW
(
IDM_MAINMENU
);
wc
.
lpszClassName
=
wszMainWndClass
;
...
...
@@ -2696,7 +2695,7 @@ int CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE hOldInstance, LPSTR szCmdPar
wc
.
hInstance
=
hInstance
;
wc
.
hIcon
=
NULL
;
wc
.
hIconSm
=
NULL
;
wc
.
hCursor
=
LoadCursor
(
NULL
,
IDC_IBEAM
);
wc
.
hCursor
=
LoadCursor
W
(
NULL
,
(
LPWSTR
)
IDC_IBEAM
);
wc
.
hbrBackground
=
NULL
;
wc
.
lpszMenuName
=
NULL
;
wc
.
lpszClassName
=
wszPreviewWndClass
;
...
...
@@ -2727,7 +2726,7 @@ int CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE hOldInstance, LPSTR szCmdPar
while
(
GetMessageW
(
&
msg
,
0
,
0
,
0
))
{
if
(
IsDialogMessage
(
hFindWnd
,
&
msg
))
if
(
IsDialogMessage
W
(
hFindWnd
,
&
msg
))
continue
;
if
(
TranslateAcceleratorW
(
hMainWnd
,
hAccel
,
&
msg
))
...
...
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