comctl32: Build with msvcrt.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
54bd7e655a
commit
e4e2e8e551
|
@ -4,6 +4,8 @@ IMPORTLIB = comctl32
|
|||
IMPORTS = uuid user32 gdi32 advapi32 usp10 imm32
|
||||
DELAYIMPORTS = winmm uxtheme
|
||||
|
||||
EXTRADLLFLAGS = -mno-cygwin
|
||||
|
||||
C_SRCS = \
|
||||
animate.c \
|
||||
button.c \
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
#include "uxtheme.h"
|
||||
#include "vssym32.h"
|
||||
#include "commctrl.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "wine/debug.h"
|
||||
#include "wine/heap.h"
|
||||
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
#include "commctrl.h"
|
||||
#include "comctl32.h"
|
||||
#include "wine/debug.h"
|
||||
#include "wine/unicode.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(comboex);
|
||||
|
||||
|
@ -632,14 +631,14 @@ static INT COMBOEX_InsertItemW (COMBOEX_INFO *infoPtr, COMBOBOXEXITEMW const *ci
|
|||
if (item->mask & CBEIF_TEXT) {
|
||||
INT len = 0;
|
||||
|
||||
if (is_textW(cit->pszText)) len = strlenW (cit->pszText);
|
||||
if (is_textW(cit->pszText)) len = lstrlenW (cit->pszText);
|
||||
if (len > 0) {
|
||||
item->pszText = Alloc ((len + 1)*sizeof(WCHAR));
|
||||
if (!item->pszText) {
|
||||
Free(item);
|
||||
return -1;
|
||||
}
|
||||
strcpyW (item->pszText, cit->pszText);
|
||||
lstrcpyW (item->pszText, cit->pszText);
|
||||
}
|
||||
else if (cit->pszText == LPSTR_TEXTCALLBACKW)
|
||||
item->pszText = LPSTR_TEXTCALLBACKW;
|
||||
|
@ -765,11 +764,11 @@ static BOOL COMBOEX_SetItemW (COMBOEX_INFO *infoPtr, const COMBOBOXEXITEMW *cit)
|
|||
INT len = 0;
|
||||
|
||||
COMBOEX_FreeText(item);
|
||||
if (is_textW(cit->pszText)) len = strlenW(cit->pszText);
|
||||
if (is_textW(cit->pszText)) len = lstrlenW(cit->pszText);
|
||||
if (len > 0) {
|
||||
item->pszText = Alloc ((len + 1)*sizeof(WCHAR));
|
||||
if (!item->pszText) return FALSE;
|
||||
strcpyW(item->pszText, cit->pszText);
|
||||
lstrcpyW(item->pszText, cit->pszText);
|
||||
} else if (cit->pszText == LPSTR_TEXTCALLBACKW)
|
||||
item->pszText = LPSTR_TEXTCALLBACKW;
|
||||
item->cchTextMax = cit->cchTextMax;
|
||||
|
@ -1404,7 +1403,7 @@ static LRESULT COMBOEX_DrawItem (COMBOEX_INFO *infoPtr, DRAWITEMSTRUCT const *di
|
|||
str = COMBOEX_GetText(infoPtr, item);
|
||||
if (!str) str = nil;
|
||||
|
||||
len = strlenW (str);
|
||||
len = lstrlenW (str);
|
||||
GetTextExtentPoint32W (dis->hDC, str, len, &txtsize);
|
||||
|
||||
if (dis->itemAction & (ODA_SELECT | ODA_DRAWENTIRE)) {
|
||||
|
|
|
@ -26,8 +26,6 @@
|
|||
* COMCTL32.DLL (internally).
|
||||
*
|
||||
*/
|
||||
#include "config.h"
|
||||
#include "wine/port.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
|
@ -47,7 +45,6 @@
|
|||
#include "objbase.h"
|
||||
#include "winerror.h"
|
||||
|
||||
#include "wine/unicode.h"
|
||||
#include "comctl32.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
|
@ -311,7 +308,7 @@ static void MRU_SaveChanged ( LPWINEMRULIST mp )
|
|||
if (mp->wineFlags & WMRUF_CHANGED) {
|
||||
mp->wineFlags &= ~WMRUF_CHANGED;
|
||||
err = RegSetValueExW(newkey, strMRUList, 0, REG_SZ, (LPBYTE)mp->realMRU,
|
||||
(strlenW(mp->realMRU) + 1)*sizeof(WCHAR));
|
||||
(lstrlenW(mp->realMRU) + 1)*sizeof(WCHAR));
|
||||
if (err) {
|
||||
ERR("error saving MRUList, err=%d\n", err);
|
||||
}
|
||||
|
@ -470,7 +467,7 @@ INT WINAPI AddMRUData (HANDLE hList, LPCVOID lpData, DWORD cbData)
|
|||
|
||||
if ((replace = FindMRUData (hList, lpData, cbData, NULL)) >= 0) {
|
||||
/* Item exists, just move it to the front */
|
||||
LPWSTR pos = strchrW(mp->realMRU, replace + 'a');
|
||||
LPWSTR pos = wcschr(mp->realMRU, replace + 'a');
|
||||
while (pos > mp->realMRU)
|
||||
{
|
||||
pos[0] = pos[-1];
|
||||
|
@ -555,7 +552,7 @@ INT WINAPI AddMRUStringW(HANDLE hList, LPCWSTR lpszString)
|
|||
}
|
||||
|
||||
return AddMRUData(hList, lpszString,
|
||||
(strlenW(lpszString) + 1) * sizeof(WCHAR));
|
||||
(lstrlenW(lpszString) + 1) * sizeof(WCHAR));
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
|
@ -747,8 +744,8 @@ HANDLE WINAPI CreateMRUListLazyW (const MRUINFOW *infoW, DWORD dwParam2,
|
|||
|
||||
mp = Alloc(sizeof(WINEMRULIST));
|
||||
memcpy(&mp->extview, infoW, sizeof(MRUINFOW));
|
||||
mp->extview.lpszSubKey = Alloc((strlenW(infoW->lpszSubKey) + 1) * sizeof(WCHAR));
|
||||
strcpyW(mp->extview.lpszSubKey, infoW->lpszSubKey);
|
||||
mp->extview.lpszSubKey = Alloc((lstrlenW(infoW->lpszSubKey) + 1) * sizeof(WCHAR));
|
||||
lstrcpyW(mp->extview.lpszSubKey, infoW->lpszSubKey);
|
||||
mp->isUnicode = TRUE;
|
||||
|
||||
return create_mru_list(mp);
|
||||
|
|
|
@ -69,7 +69,6 @@
|
|||
#include "shlwapi.h"
|
||||
#include "comctl32.h"
|
||||
#include "wine/debug.h"
|
||||
#include "wine/unicode.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(commctrl);
|
||||
|
||||
|
@ -136,7 +135,7 @@ BOOL WINAPI RegisterClassNameW(const WCHAR *class)
|
|||
while (min <= max)
|
||||
{
|
||||
int res, pos = (min + max) / 2;
|
||||
if (!(res = strcmpiW(class, classes[pos].nameW)))
|
||||
if (!(res = wcsicmp(class, classes[pos].nameW)))
|
||||
{
|
||||
classes[pos].fn_register();
|
||||
return TRUE;
|
||||
|
|
|
@ -44,7 +44,6 @@
|
|||
#include "commctrl.h"
|
||||
#include "comctl32.h"
|
||||
#include "wine/debug.h"
|
||||
#include "wine/unicode.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(datetime);
|
||||
|
||||
|
@ -251,7 +250,7 @@ DATETIME_UseFormat (DATETIME_INFO *infoPtr, LPCWSTR formattxt)
|
|||
|
||||
*nrFields = 0;
|
||||
infoPtr->fieldspec[*nrFields] = 0;
|
||||
len = strlenW(allowedformatchars);
|
||||
len = lstrlenW(allowedformatchars);
|
||||
k = 0;
|
||||
|
||||
for (i = 0; formattxt[i]; i++) {
|
||||
|
@ -715,7 +714,7 @@ static int DATETIME_GetFieldWidth (const DATETIME_INFO *infoPtr, HDC hdc, int co
|
|||
break;
|
||||
}
|
||||
}
|
||||
GetTextExtentPoint32W (hdc, bufptr, strlenW(bufptr), &size);
|
||||
GetTextExtentPoint32W (hdc, bufptr, lstrlenW(bufptr), &size);
|
||||
return size.cx;
|
||||
}
|
||||
|
||||
|
@ -735,14 +734,14 @@ DATETIME_Refresh (DATETIME_INFO *infoPtr, HDC hdc)
|
|||
WCHAR txt[80];
|
||||
|
||||
DATETIME_ReturnTxt (infoPtr, 0, txt, ARRAY_SIZE(txt));
|
||||
GetTextExtentPoint32W (hdc, txt, strlenW(txt), &size);
|
||||
GetTextExtentPoint32W (hdc, txt, lstrlenW(txt), &size);
|
||||
rcDraw->bottom = size.cy + 2;
|
||||
|
||||
prevright = infoPtr->checkbox.right = ((infoPtr->dwStyle & DTS_SHOWNONE) ? 18 : 2);
|
||||
|
||||
for (i = 0; i < infoPtr->nrFields; i++) {
|
||||
DATETIME_ReturnTxt (infoPtr, i, txt, ARRAY_SIZE(txt));
|
||||
GetTextExtentPoint32W (hdc, txt, strlenW(txt), &size);
|
||||
GetTextExtentPoint32W (hdc, txt, lstrlenW(txt), &size);
|
||||
field = &infoPtr->fieldRect[i];
|
||||
field->left = prevright;
|
||||
field->right = prevright + DATETIME_GetFieldWidth (infoPtr, hdc, i);
|
||||
|
@ -762,7 +761,7 @@ DATETIME_Refresh (DATETIME_INFO *infoPtr, HDC hdc)
|
|||
{
|
||||
memcpy(txt, infoPtr->charsEntered, infoPtr->nCharsEntered * sizeof(WCHAR));
|
||||
txt[infoPtr->nCharsEntered] = 0;
|
||||
GetTextExtentPoint32W (hdc, txt, strlenW(txt), &size);
|
||||
GetTextExtentPoint32W (hdc, txt, lstrlenW(txt), &size);
|
||||
}
|
||||
|
||||
SetRect(&selection, 0, 0, size.cx, size.cy);
|
||||
|
@ -778,7 +777,7 @@ DATETIME_Refresh (DATETIME_INFO *infoPtr, HDC hdc)
|
|||
oldTextColor = SetTextColor (hdc, comctl32_color.clrWindowText);
|
||||
|
||||
/* draw the date text using the colour set above */
|
||||
DrawTextW (hdc, txt, strlenW(txt), field, DT_CENTER | DT_VCENTER | DT_SINGLELINE);
|
||||
DrawTextW (hdc, txt, lstrlenW(txt), field, DT_CENTER | DT_VCENTER | DT_SINGLELINE);
|
||||
SetTextColor (hdc, oldTextColor);
|
||||
}
|
||||
SetBkMode (hdc, oldBkMode);
|
||||
|
@ -1460,7 +1459,7 @@ static BOOL DATETIME_GetIdealSize(DATETIME_INFO *infoPtr, SIZE *size)
|
|||
|
||||
/* Get text font height */
|
||||
DATETIME_ReturnTxt(infoPtr, 0, txt, ARRAY_SIZE(txt));
|
||||
GetTextExtentPoint32W(hdc, txt, strlenW(txt), &field_size);
|
||||
GetTextExtentPoint32W(hdc, txt, lstrlenW(txt), &field_size);
|
||||
size->cy = field_size.cy;
|
||||
|
||||
/* Get text font width */
|
||||
|
@ -1572,11 +1571,11 @@ DATETIME_GetText (const DATETIME_INFO *infoPtr, INT count, LPWSTR dst)
|
|||
for (i = 0; i < infoPtr->nrFields; i++)
|
||||
{
|
||||
DATETIME_ReturnTxt(infoPtr, i, buf, ARRAY_SIZE(buf));
|
||||
if ((strlenW(dst) + strlenW(buf)) < count)
|
||||
strcatW(dst, buf);
|
||||
if ((lstrlenW(dst) + lstrlenW(buf)) < count)
|
||||
lstrcatW(dst, buf);
|
||||
else break;
|
||||
}
|
||||
return strlenW(dst);
|
||||
return lstrlenW(dst);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -32,8 +32,6 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -46,7 +44,6 @@
|
|||
#include "commctrl.h"
|
||||
#include "uxtheme.h"
|
||||
#include "vsstyle.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "wine/debug.h"
|
||||
#include "wine/heap.h"
|
||||
|
||||
|
@ -176,7 +173,7 @@ static LRESULT EDIT_EM_PosFromChar(EDITSTATE *es, INT index, BOOL after_wrap);
|
|||
*/
|
||||
static inline BOOL EDIT_EM_CanUndo(const EDITSTATE *es)
|
||||
{
|
||||
return (es->undo_insert_count || strlenW(es->undo_text));
|
||||
return (es->undo_insert_count || lstrlenW(es->undo_text));
|
||||
}
|
||||
|
||||
|
||||
|
@ -212,7 +209,7 @@ static HBRUSH EDIT_NotifyCtlColor(EDITSTATE *es, HDC hdc)
|
|||
static inline UINT get_text_length(EDITSTATE *es)
|
||||
{
|
||||
if(es->text_length == (UINT)-1)
|
||||
es->text_length = strlenW(es->text);
|
||||
es->text_length = lstrlenW(es->text);
|
||||
return es->text_length;
|
||||
}
|
||||
|
||||
|
@ -520,7 +517,7 @@ static void EDIT_BuildLineDefs_ML(EDITSTATE *es, INT istart, INT iend, INT delta
|
|||
/* Mark type of line termination */
|
||||
if (!(*cp)) {
|
||||
current_line->ending = END_0;
|
||||
current_line->net_length = strlenW(current_position);
|
||||
current_line->net_length = lstrlenW(current_position);
|
||||
} else if ((cp > current_position) && (*(cp - 1) == '\r')) {
|
||||
current_line->ending = END_SOFT;
|
||||
current_line->net_length = cp - current_position - 1;
|
||||
|
@ -2190,7 +2187,7 @@ static void EDIT_PaintLine(EDITSTATE *es, HDC dc, INT line, BOOL rev)
|
|||
if (es->cue_banner_text && es->text_length == 0 && (!(es->flags & EF_FOCUSED) || es->cue_banner_draw_focused))
|
||||
{
|
||||
SetTextColor(dc, GetSysColor(COLOR_GRAYTEXT));
|
||||
TextOutW(dc, x, y, es->cue_banner_text, strlenW(es->cue_banner_text));
|
||||
TextOutW(dc, x, y, es->cue_banner_text, lstrlenW(es->cue_banner_text));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2480,7 +2477,7 @@ static void EDIT_EM_ReplaceSel(EDITSTATE *es, BOOL can_undo, const WCHAR *lpsz_r
|
|||
memcpy(buf, es->text + s, bufl * sizeof(WCHAR));
|
||||
buf[bufl] = 0; /* ensure 0 termination */
|
||||
/* now delete */
|
||||
strcpyW(es->text + s, es->text + e);
|
||||
lstrcpyW(es->text + s, es->text + e);
|
||||
text_buffer_changed(es);
|
||||
}
|
||||
if (strl) {
|
||||
|
@ -2508,7 +2505,7 @@ static void EDIT_EM_ReplaceSel(EDITSTATE *es, BOOL can_undo, const WCHAR *lpsz_r
|
|||
/* if text is too long undo all changes */
|
||||
if (honor_limit && !(es->style & ES_AUTOVSCROLL) && (es->line_count > vlc)) {
|
||||
if (strl)
|
||||
strcpyW(es->text + e, es->text + e + strl);
|
||||
lstrcpyW(es->text + e, es->text + e + strl);
|
||||
if (e != s)
|
||||
for (i = 0 , p = es->text ; i < e - s ; i++)
|
||||
p[i + s] = buf[i];
|
||||
|
@ -2528,7 +2525,7 @@ static void EDIT_EM_ReplaceSel(EDITSTATE *es, BOOL can_undo, const WCHAR *lpsz_r
|
|||
/* remove chars that don't fit */
|
||||
if (honor_limit && !(es->style & ES_AUTOHSCROLL) && (es->text_width > fw)) {
|
||||
while ((es->text_width > fw) && s + strl >= s) {
|
||||
strcpyW(es->text + s + strl - 1, es->text + s + strl);
|
||||
lstrcpyW(es->text + s + strl - 1, es->text + s + strl);
|
||||
strl--;
|
||||
es->text_length = -1;
|
||||
EDIT_InvalidateUniscribeData(es);
|
||||
|
@ -2541,7 +2538,7 @@ static void EDIT_EM_ReplaceSel(EDITSTATE *es, BOOL can_undo, const WCHAR *lpsz_r
|
|||
|
||||
if (e != s) {
|
||||
if (can_undo) {
|
||||
utl = strlenW(es->undo_text);
|
||||
utl = lstrlenW(es->undo_text);
|
||||
if (!es->undo_insert_count && (*es->undo_text && (s == es->undo_position))) {
|
||||
/* undo-buffer is extended to the right */
|
||||
EDIT_MakeUndoFit(es, utl + e - s);
|
||||
|
@ -2880,11 +2877,11 @@ static BOOL EDIT_EM_Undo(EDITSTATE *es)
|
|||
if( es->style & ES_READONLY )
|
||||
return !(es->style & ES_MULTILINE);
|
||||
|
||||
ulength = strlenW(es->undo_text);
|
||||
ulength = lstrlenW(es->undo_text);
|
||||
|
||||
utext = heap_alloc((ulength + 1) * sizeof(WCHAR));
|
||||
|
||||
strcpyW(utext, es->undo_text);
|
||||
lstrcpyW(utext, es->undo_text);
|
||||
|
||||
TRACE("before UNDO:insertion length = %d, deletion buffer = %s\n",
|
||||
es->undo_insert_count, debugstr_w(utext));
|
||||
|
@ -2935,9 +2932,9 @@ static void EDIT_WM_Paste(EDITSTATE *es)
|
|||
OpenClipboard(es->hwndSelf);
|
||||
if ((hsrc = GetClipboardData(CF_UNICODETEXT))) {
|
||||
src = GlobalLock(hsrc);
|
||||
len = strlenW(src);
|
||||
len = lstrlenW(src);
|
||||
/* Protect single-line edit against pasting new line character */
|
||||
if (!(es->style & ES_MULTILINE) && ((ptr = strchrW(src, '\n')))) {
|
||||
if (!(es->style & ES_MULTILINE) && ((ptr = wcschr(src, '\n')))) {
|
||||
len = ptr - src;
|
||||
if (len && src[len - 1] == '\r')
|
||||
--len;
|
||||
|
@ -3202,7 +3199,7 @@ static INT EDIT_WM_GetText(const EDITSTATE *es, INT count, LPWSTR dst)
|
|||
return 0;
|
||||
|
||||
lstrcpynW(dst, es->text, count);
|
||||
return strlenW(dst);
|
||||
return lstrlenW(dst);
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
|
@ -3808,7 +3805,7 @@ static void EDIT_WM_SetText(EDITSTATE *es, LPCWSTR text)
|
|||
if (text)
|
||||
{
|
||||
TRACE("%s\n", debugstr_w(text));
|
||||
EDIT_EM_ReplaceSel(es, FALSE, text, strlenW(text), FALSE, FALSE);
|
||||
EDIT_EM_ReplaceSel(es, FALSE, text, lstrlenW(text), FALSE, FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -4209,9 +4206,9 @@ static LRESULT EDIT_EM_GetThumb(EDITSTATE *es)
|
|||
|
||||
static inline WCHAR *heap_strdupW(const WCHAR *str)
|
||||
{
|
||||
int len = strlenW(str) + 1;
|
||||
int len = lstrlenW(str) + 1;
|
||||
WCHAR *ret = heap_alloc(len * sizeof(WCHAR));
|
||||
strcpyW(ret, str);
|
||||
lstrcpyW(ret, str);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -4536,7 +4533,7 @@ static LRESULT EDIT_WM_Create(EDITSTATE *es, const WCHAR *name)
|
|||
|
||||
if (name && *name)
|
||||
{
|
||||
EDIT_EM_ReplaceSel(es, FALSE, name, strlenW(name), FALSE, FALSE);
|
||||
EDIT_EM_ReplaceSel(es, FALSE, name, lstrlenW(name), FALSE, FALSE);
|
||||
/* if we insert text to the editline, the text scrolls out
|
||||
* of the window, as the caret is placed after the insert
|
||||
* pos normally; thus we reset es->selection... to 0 and
|
||||
|
@ -4706,7 +4703,7 @@ static LRESULT CALLBACK EDIT_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR
|
|||
{
|
||||
const WCHAR *textW = (const WCHAR *)lParam;
|
||||
|
||||
EDIT_EM_ReplaceSel(es, (BOOL)wParam, textW, strlenW(textW), TRUE, TRUE);
|
||||
EDIT_EM_ReplaceSel(es, (BOOL)wParam, textW, lstrlenW(textW), TRUE, TRUE);
|
||||
result = 1;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -33,7 +33,6 @@
|
|||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "wingdi.h"
|
||||
#include "winuser.h"
|
||||
#include "winnls.h"
|
||||
|
|
|
@ -38,7 +38,6 @@
|
|||
#include "uxtheme.h"
|
||||
#include "vsstyle.h"
|
||||
#include "vssym32.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "wine/debug.h"
|
||||
#include "wine/heap.h"
|
||||
|
||||
|
@ -83,12 +82,12 @@ static void IPADDRESS_UpdateText (const IPADDRESS_INFO *infoPtr)
|
|||
|
||||
for (i = 0; i < 4; i++) {
|
||||
if (GetWindowTextW (infoPtr->Part[i].EditHwnd, field, 4))
|
||||
strcatW(ip, field);
|
||||
lstrcatW(ip, field);
|
||||
else
|
||||
/* empty edit treated as zero */
|
||||
strcatW(ip, zero);
|
||||
lstrcatW(ip, zero);
|
||||
if (i != 3)
|
||||
strcatW(ip, dot);
|
||||
lstrcatW(ip, dot);
|
||||
}
|
||||
|
||||
SetWindowTextW(infoPtr->Self, ip);
|
||||
|
@ -237,7 +236,7 @@ static LRESULT IPADDRESS_Create (HWND hwnd, const CREATESTRUCTA *lpCreate)
|
|||
hSysFont = GetStockObject(ANSI_VAR_FONT);
|
||||
GetObjectW(hSysFont, sizeof(LOGFONTW), &logSysFont);
|
||||
SystemParametersInfoW(SPI_GETICONTITLELOGFONT, 0, &logFont, 0);
|
||||
strcpyW(logFont.lfFaceName, logSysFont.lfFaceName);
|
||||
lstrcpyW(logFont.lfFaceName, logSysFont.lfFaceName);
|
||||
hFont = CreateFontIndirectW(&logFont);
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
|
@ -336,7 +335,7 @@ static int IPADDRESS_GetAddress (const IPADDRESS_INFO *infoPtr, LPDWORD ip_addre
|
|||
for (i = 0; i < 4; i++) {
|
||||
ip_addr *= 256;
|
||||
if (GetWindowTextW (infoPtr->Part[i].EditHwnd, field, 4))
|
||||
ip_addr += atolW(field);
|
||||
ip_addr += wcstol(field, NULL, 10);
|
||||
else
|
||||
invalid++;
|
||||
}
|
||||
|
@ -418,7 +417,7 @@ static BOOL IPADDRESS_ConstrainField (const IPADDRESS_INFO *infoPtr, int current
|
|||
part = &infoPtr->Part[currentfield];
|
||||
if (!GetWindowTextW (part->EditHwnd, field, 4)) return FALSE;
|
||||
|
||||
curValue = atoiW(field);
|
||||
curValue = wcstol(field, NULL, 10);
|
||||
TRACE(" curValue=%d\n", curValue);
|
||||
|
||||
newValue = IPADDRESS_IPNotify(infoPtr, currentfield, curValue);
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
#include "commctrl.h"
|
||||
#include "uxtheme.h"
|
||||
#include "vssym32.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "wine/exception.h"
|
||||
#include "wine/debug.h"
|
||||
#include "wine/heap.h"
|
||||
|
@ -684,14 +683,14 @@ static void LISTBOX_PaintItem( LB_DESCR *descr, HDC hdc, const RECT *rect,
|
|||
else if (!(descr->style & LBS_USETABSTOPS))
|
||||
ExtTextOutW( hdc, rect->left + 1, rect->top,
|
||||
ETO_OPAQUE | ETO_CLIPPED, rect, item_str,
|
||||
strlenW(item_str), NULL );
|
||||
lstrlenW(item_str), NULL );
|
||||
else
|
||||
{
|
||||
/* Output empty string to paint background in the full width. */
|
||||
ExtTextOutW( hdc, rect->left + 1, rect->top,
|
||||
ETO_OPAQUE | ETO_CLIPPED, rect, NULL, 0, NULL );
|
||||
TabbedTextOutW( hdc, rect->left + 1 , rect->top,
|
||||
item_str, strlenW(item_str),
|
||||
item_str, lstrlenW(item_str),
|
||||
descr->nb_tabs, descr->tabs, 0);
|
||||
}
|
||||
if (selected)
|
||||
|
@ -857,14 +856,14 @@ static LRESULT LISTBOX_GetText( LB_DESCR *descr, INT index, LPWSTR buffer, BOOL
|
|||
WCHAR *str = get_item_string(descr, index);
|
||||
|
||||
if (!buffer)
|
||||
return strlenW(str);
|
||||
return lstrlenW(str);
|
||||
|
||||
TRACE("index %d (0x%04x) %s\n", index, index, debugstr_w(str));
|
||||
|
||||
__TRY /* hide a Delphi bug that passes a read-only buffer */
|
||||
{
|
||||
strcpyW(buffer, str);
|
||||
len = strlenW(buffer);
|
||||
lstrcpyW(buffer, str);
|
||||
len = lstrlenW(buffer);
|
||||
}
|
||||
__EXCEPT_PAGE_FAULT
|
||||
{
|
||||
|
@ -1011,7 +1010,7 @@ static INT LISTBOX_FindString( LB_DESCR *descr, INT start, LPCWSTR str, BOOL exa
|
|||
else
|
||||
{
|
||||
/* Special case for drives and directories: ignore prefix */
|
||||
INT len = strlenW(str);
|
||||
INT len = lstrlenW(str);
|
||||
WCHAR *item_str;
|
||||
|
||||
for (i = 0, index = start; i < descr->nb_items; i++, index++)
|
||||
|
@ -1019,11 +1018,11 @@ static INT LISTBOX_FindString( LB_DESCR *descr, INT start, LPCWSTR str, BOOL exa
|
|||
if (index == descr->nb_items) index = 0;
|
||||
item_str = get_item_string(descr, index);
|
||||
|
||||
if (!strncmpiW(str, item_str, len)) return index;
|
||||
if (!wcsnicmp(str, item_str, len)) return index;
|
||||
if (item_str[0] == '[')
|
||||
{
|
||||
if (!strncmpiW(str, item_str + 1, len)) return index;
|
||||
if (item_str[1] == '-' && !strncmpiW(str, item_str + 2, len)) return index;
|
||||
if (!wcsnicmp(str, item_str + 1, len)) return index;
|
||||
if (item_str[1] == '-' && !wcsnicmp(str, item_str + 2, len)) return index;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1688,12 +1687,12 @@ static LRESULT LISTBOX_InsertString( LB_DESCR *descr, INT index, LPCWSTR str )
|
|||
{
|
||||
static const WCHAR empty_stringW[] = { 0 };
|
||||
if (!str) str = empty_stringW;
|
||||
if (!(new_str = HeapAlloc( GetProcessHeap(), 0, (strlenW(str) + 1) * sizeof(WCHAR) )))
|
||||
if (!(new_str = HeapAlloc( GetProcessHeap(), 0, (lstrlenW(str) + 1) * sizeof(WCHAR) )))
|
||||
{
|
||||
SEND_NOTIFICATION( descr, LBN_ERRSPACE );
|
||||
return LB_ERRSPACE;
|
||||
}
|
||||
strcpyW(new_str, str);
|
||||
lstrcpyW(new_str, str);
|
||||
}
|
||||
|
||||
if (index == -1) index = descr->nb_items;
|
||||
|
@ -1880,13 +1879,13 @@ static LRESULT LISTBOX_Directory( LB_DESCR *descr, UINT attrib,
|
|||
static const WCHAR bracketW[] = { ']',0 };
|
||||
static const WCHAR dotW[] = { '.',0 };
|
||||
if (!(attrib & DDL_DIRECTORY) ||
|
||||
!strcmpW( entry.cFileName, dotW )) continue;
|
||||
!lstrcmpW( entry.cFileName, dotW )) continue;
|
||||
buffer[0] = '[';
|
||||
if (!long_names && entry.cAlternateFileName[0])
|
||||
strcpyW( buffer + 1, entry.cAlternateFileName );
|
||||
lstrcpyW( buffer + 1, entry.cAlternateFileName );
|
||||
else
|
||||
strcpyW( buffer + 1, entry.cFileName );
|
||||
strcatW(buffer, bracketW);
|
||||
lstrcpyW( buffer + 1, entry.cFileName );
|
||||
lstrcatW(buffer, bracketW);
|
||||
}
|
||||
else /* not a directory */
|
||||
{
|
||||
|
@ -1898,9 +1897,9 @@ static LRESULT LISTBOX_Directory( LB_DESCR *descr, UINT attrib,
|
|||
continue;
|
||||
#undef ATTRIBS
|
||||
if (!long_names && entry.cAlternateFileName[0])
|
||||
strcpyW( buffer, entry.cAlternateFileName );
|
||||
lstrcpyW( buffer, entry.cAlternateFileName );
|
||||
else
|
||||
strcpyW( buffer, entry.cFileName );
|
||||
lstrcpyW( buffer, entry.cFileName );
|
||||
}
|
||||
if (!long_names) CharLowerW( buffer );
|
||||
pos = LISTBOX_FindFileStrPos( descr, buffer );
|
||||
|
@ -2732,7 +2731,7 @@ static LRESULT CALLBACK LISTBOX_WindowProc( HWND hwnd, UINT msg, WPARAM wParam,
|
|||
return LB_ERR;
|
||||
}
|
||||
if (!HAS_STRINGS(descr)) return sizeof(ULONG_PTR);
|
||||
return strlenW(get_item_string(descr, wParam));
|
||||
return lstrlenW(get_item_string(descr, wParam));
|
||||
|
||||
case LB_GETCURSEL:
|
||||
if (descr->nb_items == 0)
|
||||
|
|
|
@ -124,9 +124,6 @@
|
|||
* -- LVGroupComparE
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "wine/port.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
|
@ -145,7 +142,6 @@
|
|||
#include "uxtheme.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
#include "wine/unicode.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(listview);
|
||||
|
||||
|
@ -997,7 +993,7 @@ static BOOL notify_dispinfoT(const LISTVIEW_INFO *infoPtr, UINT code, LPNMLVDISP
|
|||
}
|
||||
else if (return_unicode && (pdi->hdr.code == LVN_GETDISPINFOW))
|
||||
{
|
||||
strcpyW(ret_text, pdi->item.pszText);
|
||||
lstrcpyW(ret_text, pdi->item.pszText);
|
||||
}
|
||||
else if (return_ansi) /* note : pointer can be changed by app ! */
|
||||
{
|
||||
|
@ -1870,7 +1866,7 @@ static INT LISTVIEW_ProcessLetterKeys(LISTVIEW_INFO *infoPtr, WPARAM charCode, L
|
|||
if (!charCode || !keyData || infoPtr->nItemCount == 0) return 0;
|
||||
|
||||
/* only allow the valid WM_CHARs through */
|
||||
if (!isalnumW(charCode) &&
|
||||
if (!iswalnum(charCode) &&
|
||||
charCode != '.' && charCode != '`' && charCode != '!' &&
|
||||
charCode != '@' && charCode != '#' && charCode != '$' &&
|
||||
charCode != '%' && charCode != '^' && charCode != '&' &&
|
||||
|
@ -6405,7 +6401,7 @@ again:
|
|||
{
|
||||
if (lpFindInfo->flags & (LVFI_PARTIAL | LVFI_SUBSTRING))
|
||||
{
|
||||
WCHAR *p = strstrW(lvItem.pszText, lpFindInfo->psz);
|
||||
WCHAR *p = wcsstr(lvItem.pszText, lpFindInfo->psz);
|
||||
if (!p || p != lvItem.pszText) continue;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -45,7 +45,6 @@
|
|||
#include "comctl32.h"
|
||||
#include "uxtheme.h"
|
||||
#include "vssym32.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "wine/debug.h"
|
||||
#include "wine/heap.h"
|
||||
|
||||
|
@ -885,18 +884,18 @@ static void MONTHCAL_PaintTitle(MONTHCAL_INFO *infoPtr, HDC hdc, const PAINTSTRU
|
|||
|
||||
/* draw formatted date string */
|
||||
GetDateFormatW(LOCALE_USER_DEFAULT, DATE_YEARMONTH, st, NULL, strW, ARRAY_SIZE(strW));
|
||||
DrawTextW(hdc, strW, strlenW(strW), title, DT_CENTER | DT_VCENTER | DT_SINGLELINE);
|
||||
DrawTextW(hdc, strW, lstrlenW(strW), title, DT_CENTER | DT_VCENTER | DT_SINGLELINE);
|
||||
|
||||
GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SYEARMONTH, fmtW, ARRAY_SIZE(fmtW));
|
||||
wsprintfW(yearW, fmtyearW, st->wYear);
|
||||
|
||||
/* month is trickier as it's possible to have different format pictures, we'll
|
||||
test for M, MM, MMM, and MMMM */
|
||||
if (strstrW(fmtW, mmmmW))
|
||||
if (wcsstr(fmtW, mmmmW))
|
||||
GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SMONTHNAME1+st->wMonth-1, monthW, ARRAY_SIZE(monthW));
|
||||
else if (strstrW(fmtW, mmmW))
|
||||
else if (wcsstr(fmtW, mmmW))
|
||||
GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SABBREVMONTHNAME1+st->wMonth-1, monthW, ARRAY_SIZE(monthW));
|
||||
else if (strstrW(fmtW, mmW))
|
||||
else if (wcsstr(fmtW, mmW))
|
||||
wsprintfW(monthW, fmtmmW, st->wMonth);
|
||||
else
|
||||
wsprintfW(monthW, fmtmW, st->wMonth);
|
||||
|
@ -905,7 +904,7 @@ static void MONTHCAL_PaintTitle(MONTHCAL_INFO *infoPtr, HDC hdc, const PAINTSTRU
|
|||
yearoffset = 0;
|
||||
while (strW[yearoffset])
|
||||
{
|
||||
if (!strncmpW(&strW[yearoffset], yearW, strlenW(yearW)))
|
||||
if (!wcsncmp(&strW[yearoffset], yearW, lstrlenW(yearW)))
|
||||
break;
|
||||
yearoffset++;
|
||||
}
|
||||
|
@ -913,7 +912,7 @@ static void MONTHCAL_PaintTitle(MONTHCAL_INFO *infoPtr, HDC hdc, const PAINTSTRU
|
|||
monthoffset = 0;
|
||||
while (strW[monthoffset])
|
||||
{
|
||||
if (!strncmpW(&strW[monthoffset], monthW, strlenW(monthW)))
|
||||
if (!wcsncmp(&strW[monthoffset], monthW, lstrlenW(monthW)))
|
||||
break;
|
||||
monthoffset++;
|
||||
}
|
||||
|
@ -930,15 +929,15 @@ static void MONTHCAL_PaintTitle(MONTHCAL_INFO *infoPtr, HDC hdc, const PAINTSTRU
|
|||
infoPtr->calendars[calIdx].titlemonth.left = sz.cx;
|
||||
|
||||
/* for right limits use actual string parts lengths */
|
||||
GetTextExtentPoint32W(hdc, &strW[yearoffset], strlenW(yearW), &sz);
|
||||
GetTextExtentPoint32W(hdc, &strW[yearoffset], lstrlenW(yearW), &sz);
|
||||
infoPtr->calendars[calIdx].titleyear.right = infoPtr->calendars[calIdx].titleyear.left + sz.cx;
|
||||
|
||||
GetTextExtentPoint32W(hdc, monthW, strlenW(monthW), &sz);
|
||||
GetTextExtentPoint32W(hdc, monthW, lstrlenW(monthW), &sz);
|
||||
infoPtr->calendars[calIdx].titlemonth.right = infoPtr->calendars[calIdx].titlemonth.left + sz.cx;
|
||||
|
||||
/* Finally translate rectangles to match center aligned string,
|
||||
hit rectangles are relative to title rectangle before translation. */
|
||||
GetTextExtentPoint32W(hdc, strW, strlenW(strW), &sz);
|
||||
GetTextExtentPoint32W(hdc, strW, lstrlenW(strW), &sz);
|
||||
shiftX = (title->right - title->left - sz.cx) / 2 + title->left;
|
||||
OffsetRect(&infoPtr->calendars[calIdx].titleyear, shiftX, 0);
|
||||
OffsetRect(&infoPtr->calendars[calIdx].titlemonth, shiftX, 0);
|
||||
|
@ -974,7 +973,7 @@ static void MONTHCAL_PaintWeeknumbers(const MONTHCAL_INFO *infoPtr, HDC hdc, con
|
|||
The first week of the year must contain only days of the new year
|
||||
*/
|
||||
GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_IFIRSTWEEKOFYEAR, buf, ARRAY_SIZE(buf));
|
||||
weeknum = atoiW(buf);
|
||||
weeknum = wcstol(buf, NULL, 10);
|
||||
switch (weeknum)
|
||||
{
|
||||
case 1: mindays = 6;
|
||||
|
@ -1205,7 +1204,7 @@ static void MONTHCAL_PaintCalendar(const MONTHCAL_INFO *infoPtr, HDC hdc, const
|
|||
i = infoPtr->firstDay;
|
||||
for(j = 0; j < 7; j++) {
|
||||
get_localized_dayname(infoPtr, (i + j + 6) % 7, buf, ARRAY_SIZE(buf));
|
||||
DrawTextW(hdc, buf, strlenW(buf), &r, DT_CENTER | DT_VCENTER | DT_SINGLELINE);
|
||||
DrawTextW(hdc, buf, lstrlenW(buf), &r, DT_CENTER | DT_VCENTER | DT_SINGLELINE);
|
||||
OffsetRect(&r, infoPtr->width_increment, 0);
|
||||
}
|
||||
|
||||
|
@ -1411,9 +1410,9 @@ MONTHCAL_SetFirstDayOfWeek(MONTHCAL_INFO *infoPtr, INT day)
|
|||
WCHAR buf[80];
|
||||
|
||||
GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_IFIRSTDAYOFWEEK, buf, ARRAY_SIZE(buf));
|
||||
TRACE("%s %d\n", debugstr_w(buf), strlenW(buf));
|
||||
TRACE("%s %d\n", debugstr_w(buf), lstrlenW(buf));
|
||||
|
||||
new_day = atoiW(buf);
|
||||
new_day = wcstol(buf, NULL, 10);
|
||||
|
||||
infoPtr->firstDaySet = FALSE;
|
||||
}
|
||||
|
|
|
@ -65,7 +65,6 @@
|
|||
#include "uxtheme.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
#include "wine/unicode.h"
|
||||
|
||||
/******************************************************************************
|
||||
* Data structures
|
||||
|
@ -177,9 +176,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(propsheet);
|
|||
|
||||
static WCHAR *heap_strdupW(const WCHAR *str)
|
||||
{
|
||||
int len = strlenW(str) + 1;
|
||||
int len = lstrlenW(str) + 1;
|
||||
WCHAR *ret = Alloc(len * sizeof(WCHAR));
|
||||
strcpyW(ret, str);
|
||||
lstrcpyW(ret, str);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -2148,8 +2147,8 @@ static void PROPSHEET_SetTitleW(HWND hwndDlg, DWORD dwStyle, LPCWSTR lpszText)
|
|||
if (dwStyle & PSH_PROPTITLE)
|
||||
{
|
||||
WCHAR* dest;
|
||||
int lentitle = strlenW(lpszText);
|
||||
int lenprop = strlenW(psInfo->strPropertiesFor);
|
||||
int lentitle = lstrlenW(lpszText);
|
||||
int lenprop = lstrlenW(psInfo->strPropertiesFor);
|
||||
|
||||
dest = Alloc( (lentitle + lenprop + 1)*sizeof (WCHAR));
|
||||
wsprintfW(dest, psInfo->strPropertiesFor, lpszText);
|
||||
|
@ -2934,7 +2933,7 @@ static LPWSTR load_string( HINSTANCE instance, LPCWSTR str )
|
|||
}
|
||||
else
|
||||
{
|
||||
int len = (strlenW(str) + 1) * sizeof(WCHAR);
|
||||
int len = (lstrlenW(str) + 1) * sizeof(WCHAR);
|
||||
ret = Alloc( len );
|
||||
if (ret) memcpy( ret, str, len );
|
||||
}
|
||||
|
|
|
@ -85,7 +85,6 @@
|
|||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "wingdi.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "winuser.h"
|
||||
#include "winnls.h"
|
||||
#include "commctrl.h"
|
||||
|
|
|
@ -36,7 +36,6 @@
|
|||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "wingdi.h"
|
||||
#include "winuser.h"
|
||||
#include "winnls.h"
|
||||
|
@ -486,10 +485,10 @@ STATUSBAR_GetTextW (STATUS_INFO *infoPtr, INT nPart, LPWSTR buf)
|
|||
if (part->style & SBT_OWNERDRAW)
|
||||
result = (LRESULT)part->text;
|
||||
else {
|
||||
result = part->text ? strlenW (part->text) : 0;
|
||||
result = part->text ? lstrlenW (part->text) : 0;
|
||||
result |= (part->style << 16);
|
||||
if (part->text && buf)
|
||||
strcpyW (buf, part->text);
|
||||
lstrcpyW (buf, part->text);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -512,7 +511,7 @@ STATUSBAR_GetTextLength (STATUS_INFO *infoPtr, INT nPart)
|
|||
part = &infoPtr->parts[nPart];
|
||||
|
||||
if ((~part->style & SBT_OWNERDRAW) && part->text)
|
||||
result = strlenW(part->text);
|
||||
result = lstrlenW(part->text);
|
||||
else
|
||||
result = 0;
|
||||
|
||||
|
@ -736,16 +735,16 @@ STATUSBAR_SetTextT (STATUS_INFO *infoPtr, INT nPart, WORD style,
|
|||
if (!ntext) return FALSE;
|
||||
MultiByteToWideChar( CP_ACP, 0, atxt, -1, ntext, len );
|
||||
} else if (text) {
|
||||
ntext = Alloc( (strlenW(text) + 1)*sizeof(WCHAR) );
|
||||
ntext = Alloc( (lstrlenW(text) + 1)*sizeof(WCHAR) );
|
||||
if (!ntext) return FALSE;
|
||||
strcpyW (ntext, text);
|
||||
lstrcpyW (ntext, text);
|
||||
} else ntext = 0;
|
||||
|
||||
/* replace nonprintable characters with spaces */
|
||||
if (ntext) {
|
||||
idx = ntext;
|
||||
while (*idx) {
|
||||
if(!isprintW(*idx))
|
||||
if(!iswprint(*idx))
|
||||
*idx = ' ';
|
||||
idx++;
|
||||
}
|
||||
|
@ -926,11 +925,11 @@ STATUSBAR_WMCreate (HWND hwnd, const CREATESTRUCTA *lpCreate)
|
|||
|
||||
OpenThemeData (hwnd, themeClass);
|
||||
|
||||
if (lpCreate->lpszName && (len = strlenW ((LPCWSTR)lpCreate->lpszName)))
|
||||
if (lpCreate->lpszName && (len = lstrlenW ((LPCWSTR)lpCreate->lpszName)))
|
||||
{
|
||||
infoPtr->parts[0].text = Alloc ((len + 1)*sizeof(WCHAR));
|
||||
if (!infoPtr->parts[0].text) goto create_fail;
|
||||
strcpyW (infoPtr->parts[0].text, (LPCWSTR)lpCreate->lpszName);
|
||||
lstrcpyW (infoPtr->parts[0].text, (LPCWSTR)lpCreate->lpszName);
|
||||
}
|
||||
|
||||
dwStyle = GetWindowLongW (hwnd, GWL_STYLE);
|
||||
|
@ -979,12 +978,12 @@ STATUSBAR_WMGetText (const STATUS_INFO *infoPtr, INT size, LPWSTR buf)
|
|||
if (!(infoPtr->parts[0].text))
|
||||
return 0;
|
||||
|
||||
len = strlenW (infoPtr->parts[0].text);
|
||||
len = lstrlenW (infoPtr->parts[0].text);
|
||||
|
||||
if (!size)
|
||||
return len;
|
||||
else if (size > len) {
|
||||
strcpyW (buf, infoPtr->parts[0].text);
|
||||
lstrcpyW (buf, infoPtr->parts[0].text);
|
||||
return len;
|
||||
}
|
||||
else {
|
||||
|
@ -1065,10 +1064,10 @@ STATUSBAR_WMSetText (const STATUS_INFO *infoPtr, LPCSTR text)
|
|||
Free (part->text);
|
||||
part->text = 0;
|
||||
|
||||
if (text && (len = strlenW((LPCWSTR)text))) {
|
||||
if (text && (len = lstrlenW((LPCWSTR)text))) {
|
||||
part->text = Alloc ((len+1)*sizeof(WCHAR));
|
||||
if (!part->text) return FALSE;
|
||||
strcpyW (part->text, (LPCWSTR)text);
|
||||
lstrcpyW (part->text, (LPCWSTR)text);
|
||||
}
|
||||
|
||||
InvalidateRect(infoPtr->Self, &part->bound, FALSE);
|
||||
|
|
|
@ -22,9 +22,6 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "wine/port.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h> /* atoi */
|
||||
|
@ -36,7 +33,6 @@
|
|||
|
||||
#include "comctl32.h"
|
||||
|
||||
#include "wine/unicode.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
|
||||
|
@ -208,7 +204,7 @@ INT WINAPI Str_GetPtrW (LPCWSTR lpSrc, LPWSTR lpDest, INT nMaxLen)
|
|||
TRACE("(%p %p %d)\n", lpSrc, lpDest, nMaxLen);
|
||||
|
||||
if (!lpDest && lpSrc)
|
||||
return strlenW (lpSrc);
|
||||
return lstrlenW (lpSrc);
|
||||
|
||||
if (nMaxLen == 0)
|
||||
return 0;
|
||||
|
@ -218,7 +214,7 @@ INT WINAPI Str_GetPtrW (LPCWSTR lpSrc, LPWSTR lpDest, INT nMaxLen)
|
|||
return 0;
|
||||
}
|
||||
|
||||
len = strlenW (lpSrc);
|
||||
len = lstrlenW (lpSrc);
|
||||
if (len >= nMaxLen)
|
||||
len = nMaxLen - 1;
|
||||
|
||||
|
@ -238,11 +234,11 @@ BOOL WINAPI Str_SetPtrW (LPWSTR *lppDest, LPCWSTR lpSrc)
|
|||
TRACE("(%p %s)\n", lppDest, debugstr_w(lpSrc));
|
||||
|
||||
if (lpSrc) {
|
||||
INT len = strlenW (lpSrc) + 1;
|
||||
INT len = lstrlenW (lpSrc) + 1;
|
||||
LPWSTR ptr = ReAlloc (*lppDest, len * sizeof(WCHAR));
|
||||
if (!ptr)
|
||||
return FALSE;
|
||||
strcpyW (ptr, lpSrc);
|
||||
lstrcpyW (ptr, lpSrc);
|
||||
*lppDest = ptr;
|
||||
}
|
||||
else {
|
||||
|
@ -391,8 +387,8 @@ LPWSTR WINAPI StrStrIW(LPCWSTR lpszStr, LPCWSTR lpszSearch)
|
|||
if (!lpszStr || !lpszSearch || !*lpszSearch)
|
||||
return NULL;
|
||||
|
||||
iLen = strlenW(lpszSearch);
|
||||
end = lpszStr + strlenW(lpszStr);
|
||||
iLen = lstrlenW(lpszSearch);
|
||||
end = lpszStr + lstrlenW(lpszStr);
|
||||
|
||||
while (lpszStr + iLen <= end)
|
||||
{
|
||||
|
@ -410,7 +406,7 @@ LPWSTR WINAPI StrStrIW(LPCWSTR lpszStr, LPCWSTR lpszSearch)
|
|||
*/
|
||||
INT WINAPI StrToIntW (LPCWSTR lpString)
|
||||
{
|
||||
return atoiW(lpString);
|
||||
return wcstol(lpString, NULL, 10);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|
@ -472,7 +468,7 @@ LPWSTR WINAPI StrChrW(LPCWSTR lpszStr, WCHAR ch)
|
|||
TRACE("(%s,%i)\n", debugstr_w(lpszStr), ch);
|
||||
|
||||
if (lpszStr)
|
||||
lpszRet = strchrW(lpszStr, ch);
|
||||
lpszRet = wcschr(lpszStr, ch);
|
||||
return lpszRet;
|
||||
}
|
||||
|
||||
|
@ -558,7 +554,7 @@ LPWSTR WINAPI StrRChrW(LPCWSTR str, LPCWSTR end, WORD ch)
|
|||
WCHAR *ret = NULL;
|
||||
|
||||
if (!str) return NULL;
|
||||
if (!end) end = str + strlenW(str);
|
||||
if (!end) end = str + lstrlenW(str);
|
||||
while (str < end)
|
||||
{
|
||||
if (*str == ch) ret = (WCHAR *)str;
|
||||
|
@ -594,7 +590,7 @@ LPSTR WINAPI StrStrA(LPCSTR lpszStr, LPCSTR lpszSearch)
|
|||
LPWSTR WINAPI StrStrW(LPCWSTR lpszStr, LPCWSTR lpszSearch)
|
||||
{
|
||||
if (!lpszStr || !lpszSearch) return NULL;
|
||||
return strstrW( lpszStr, lpszSearch );
|
||||
return wcsstr( lpszStr, lpszSearch );
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|
@ -638,10 +634,10 @@ LPWSTR WINAPI StrChrIW(LPCWSTR lpszStr, WCHAR ch)
|
|||
|
||||
if (lpszStr)
|
||||
{
|
||||
ch = toupperW(ch);
|
||||
ch = towupper(ch);
|
||||
while (*lpszStr)
|
||||
{
|
||||
if (toupperW(*lpszStr) == ch)
|
||||
if (towupper(*lpszStr) == ch)
|
||||
return (LPWSTR)lpszStr;
|
||||
lpszStr++;
|
||||
}
|
||||
|
@ -713,10 +709,10 @@ LPWSTR WINAPI StrRStrIW(LPCWSTR lpszStr, LPCWSTR lpszEnd, LPCWSTR lpszSearch)
|
|||
if (!lpszStr || !lpszSearch || !*lpszSearch)
|
||||
return NULL;
|
||||
|
||||
iLen = strlenW(lpszSearch);
|
||||
iLen = lstrlenW(lpszSearch);
|
||||
|
||||
if (!lpszEnd)
|
||||
lpszEnd = lpszStr + strlenW(lpszStr);
|
||||
lpszEnd = lpszStr + lstrlenW(lpszStr);
|
||||
else /* reproduce the broken behaviour on Windows */
|
||||
lpszEnd += min(iLen - 1, lstrlenW(lpszEnd));
|
||||
|
||||
|
@ -826,7 +822,7 @@ LPWSTR WINAPI StrRChrIW(LPCWSTR str, LPCWSTR end, WORD ch)
|
|||
WCHAR *ret = NULL;
|
||||
|
||||
if (!str) return NULL;
|
||||
if (!end) end = str + strlenW(str);
|
||||
if (!end) end = str + lstrlenW(str);
|
||||
while (str < end)
|
||||
{
|
||||
if (!COMCTL32_ChrCmpIW(*str, ch)) ret = (WCHAR *)str;
|
||||
|
@ -843,7 +839,7 @@ LPWSTR WINAPI StrRChrIW(LPCWSTR str, LPCWSTR end, WORD ch)
|
|||
int WINAPI StrCSpnW(LPCWSTR lpszStr, LPCWSTR lpszMatch)
|
||||
{
|
||||
if (!lpszStr || !lpszMatch) return 0;
|
||||
return strcspnW( lpszStr, lpszMatch );
|
||||
return wcscspn( lpszStr, lpszMatch );
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
#include "winnls.h"
|
||||
#include "commctrl.h"
|
||||
#include "comctl32.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "wine/debug.h"
|
||||
#include "wine/list.h"
|
||||
|
||||
|
@ -124,7 +123,7 @@ static PDOC_ITEM SYSLINK_AppendDocItem (SYSLINK_INFO *infoPtr, LPCWSTR Text, UIN
|
|||
{
|
||||
PDOC_ITEM Item;
|
||||
|
||||
textlen = min(textlen, strlenW(Text));
|
||||
textlen = min(textlen, lstrlenW(Text));
|
||||
Item = Alloc(FIELD_OFFSET(DOC_ITEM, Text[textlen + 1]));
|
||||
if(Item == NULL)
|
||||
{
|
||||
|
@ -183,7 +182,7 @@ static UINT SYSLINK_ParseText (SYSLINK_INFO *infoPtr, LPCWSTR Text)
|
|||
{
|
||||
if(*current == '<')
|
||||
{
|
||||
if(!strncmpiW(current, SL_LINKOPEN, ARRAY_SIZE(SL_LINKOPEN)) && (CurrentType == slText))
|
||||
if(!wcsnicmp(current, SL_LINKOPEN, ARRAY_SIZE(SL_LINKOPEN)) && (CurrentType == slText))
|
||||
{
|
||||
BOOL ValidParam = FALSE, ValidLink = FALSE;
|
||||
|
||||
|
@ -211,14 +210,14 @@ static UINT SYSLINK_ParseText (SYSLINK_INFO *infoPtr, LPCWSTR Text)
|
|||
|
||||
CheckParameter:
|
||||
/* compare the current position with all known parameters */
|
||||
if(!strncmpiW(tmp, SL_HREF, ARRAY_SIZE(SL_HREF)))
|
||||
if(!wcsnicmp(tmp, SL_HREF, ARRAY_SIZE(SL_HREF)))
|
||||
{
|
||||
taglen += 6;
|
||||
ValidParam = TRUE;
|
||||
CurrentParameter = &lpUrl;
|
||||
CurrentParameterLen = &lenUrl;
|
||||
}
|
||||
else if(!strncmpiW(tmp, SL_ID, ARRAY_SIZE(SL_ID)))
|
||||
else if(!wcsnicmp(tmp, SL_ID, ARRAY_SIZE(SL_ID)))
|
||||
{
|
||||
taglen += 4;
|
||||
ValidParam = TRUE;
|
||||
|
@ -292,7 +291,7 @@ CheckParameter:
|
|||
}
|
||||
}
|
||||
}
|
||||
else if(!strncmpiW(current, SL_LINKCLOSE, ARRAY_SIZE(SL_LINKCLOSE)) && (CurrentType == slLink) && firsttag)
|
||||
else if(!wcsnicmp(current, SL_LINKCLOSE, ARRAY_SIZE(SL_LINKCLOSE)) && (CurrentType == slLink) && firsttag)
|
||||
{
|
||||
/* there's a <a...> tag opened, first add the previous text, if present */
|
||||
if(textstart != NULL && textlen > 0 && firsttag > textstart)
|
||||
|
@ -330,7 +329,7 @@ CheckParameter:
|
|||
/* Copy the tag parameters */
|
||||
if(lpID != NULL)
|
||||
{
|
||||
nc = min(lenId, strlenW(lpID));
|
||||
nc = min(lenId, lstrlenW(lpID));
|
||||
nc = min(nc, MAX_LINKID_TEXT - 1);
|
||||
Last->u.Link.szID = Alloc((nc + 1) * sizeof(WCHAR));
|
||||
if(Last->u.Link.szID != NULL)
|
||||
|
@ -342,7 +341,7 @@ CheckParameter:
|
|||
Last->u.Link.szID = NULL;
|
||||
if(lpUrl != NULL)
|
||||
{
|
||||
nc = min(lenUrl, strlenW(lpUrl));
|
||||
nc = min(lenUrl, lstrlenW(lpUrl));
|
||||
nc = min(nc, L_MAX_URL_LENGTH - 1);
|
||||
Last->u.Link.szUrl = Alloc((nc + 1) * sizeof(WCHAR));
|
||||
if(Last->u.Link.szUrl != NULL)
|
||||
|
@ -408,7 +407,7 @@ CheckParameter:
|
|||
/* Copy the tag parameters */
|
||||
if(lpID != NULL)
|
||||
{
|
||||
nc = min(lenId, strlenW(lpID));
|
||||
nc = min(lenId, lstrlenW(lpID));
|
||||
nc = min(nc, MAX_LINKID_TEXT - 1);
|
||||
Last->u.Link.szID = Alloc((nc + 1) * sizeof(WCHAR));
|
||||
if(Last->u.Link.szID != NULL)
|
||||
|
@ -420,7 +419,7 @@ CheckParameter:
|
|||
Last->u.Link.szID = NULL;
|
||||
if(lpUrl != NULL)
|
||||
{
|
||||
nc = min(lenUrl, strlenW(lpUrl));
|
||||
nc = min(lenUrl, lstrlenW(lpUrl));
|
||||
nc = min(nc, L_MAX_URL_LENGTH - 1);
|
||||
Last->u.Link.szUrl = Alloc((nc + 1) * sizeof(WCHAR));
|
||||
if(Last->u.Link.szUrl != NULL)
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
#include "comctl32.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
#include "wine/unicode.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(taskdialog);
|
||||
|
||||
|
@ -134,8 +133,8 @@ static WCHAR *taskdialog_get_exe_name(WCHAR *name, DWORD length)
|
|||
if (len && len < length)
|
||||
{
|
||||
WCHAR *p;
|
||||
if ((p = strrchrW(name, '/'))) name = p + 1;
|
||||
if ((p = strrchrW(name, '\\'))) name = p + 1;
|
||||
if ((p = wcsrchr(name, '/'))) name = p + 1;
|
||||
if ((p = wcsrchr(name, '\\'))) name = p + 1;
|
||||
return name;
|
||||
}
|
||||
else
|
||||
|
@ -164,7 +163,7 @@ static DLGTEMPLATE *create_taskdialog_template(const TASKDIALOGCONFIG *taskconfi
|
|||
titleW = taskconfig->pszWindowTitle;
|
||||
if (!titleW)
|
||||
titleW = emptyW;
|
||||
title_size = (strlenW(titleW) + 1) * sizeof(WCHAR);
|
||||
title_size = (lstrlenW(titleW) + 1) * sizeof(WCHAR);
|
||||
|
||||
size = sizeof(DLGTEMPLATE) + 2 * sizeof(WORD);
|
||||
size += title_size;
|
||||
|
@ -359,7 +358,7 @@ static WCHAR *taskdialog_gettext(struct taskdialog_info *dialog_info, BOOL user_
|
|||
else
|
||||
{
|
||||
textW = text;
|
||||
length = strlenW(textW);
|
||||
length = lstrlenW(textW);
|
||||
}
|
||||
|
||||
ret = Alloc((length + 1) * sizeof(WCHAR));
|
||||
|
|
|
@ -76,7 +76,6 @@
|
|||
#include "winreg.h"
|
||||
#include "wingdi.h"
|
||||
#include "winuser.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "winnls.h"
|
||||
#include "commctrl.h"
|
||||
#include "comctl32.h"
|
||||
|
@ -1227,7 +1226,7 @@ TOOLBAR_MeasureString(const TOOLBAR_INFO *infoPtr, const TBUTTON_INFO *btnPtr,
|
|||
|
||||
if(lpText != NULL) {
|
||||
/* first get size of all the text */
|
||||
GetTextExtentPoint32W (hdc, lpText, strlenW (lpText), lpSize);
|
||||
GetTextExtentPoint32W (hdc, lpText, lstrlenW (lpText), lpSize);
|
||||
|
||||
/* feed above size into the rectangle for DrawText */
|
||||
SetRect(&myrect, 0, 0, lpSize->cx, lpSize->cy);
|
||||
|
@ -2957,7 +2956,7 @@ TOOLBAR_AddStringW (TOOLBAR_INFO *infoPtr, HINSTANCE hInstance, LPARAM lParam)
|
|||
delimiter = *szString;
|
||||
p = szString + 1;
|
||||
|
||||
while ((next_delim = strchrW(p, delimiter)) != NULL) {
|
||||
while ((next_delim = wcschr(p, delimiter)) != NULL) {
|
||||
*next_delim = 0;
|
||||
if (next_delim + 1 >= szString + len)
|
||||
{
|
||||
|
@ -2981,7 +2980,7 @@ TOOLBAR_AddStringW (TOOLBAR_INFO *infoPtr, HINSTANCE hInstance, LPARAM lParam)
|
|||
return -1;
|
||||
TRACE("adding string(s) from array\n");
|
||||
while (*p) {
|
||||
len = strlenW (p);
|
||||
len = lstrlenW (p);
|
||||
|
||||
TRACE("len=%d %s\n", len, debugstr_w(p));
|
||||
infoPtr->strings = ReAlloc(infoPtr->strings, sizeof(LPWSTR)*(infoPtr->nNumStrings+1));
|
||||
|
@ -3436,8 +3435,8 @@ TOOLBAR_GetButtonText (const TOOLBAR_INFO *infoPtr, INT Id, LPWSTR lpStr, BOOL i
|
|||
{
|
||||
if (lpText)
|
||||
{
|
||||
ret = strlenW (lpText);
|
||||
if (lpStr) strcpyW (lpStr, lpText);
|
||||
ret = lstrlenW (lpText);
|
||||
if (lpStr) lstrcpyW (lpStr, lpText);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -3848,7 +3847,7 @@ TOOLBAR_MapAccelerator (const TOOLBAR_INFO *infoPtr, WCHAR wAccel, UINT *pIDButt
|
|||
if (!(btnPtr->fsStyle & BTNS_NOPREFIX) &&
|
||||
!(btnPtr->fsState & TBSTATE_HIDDEN))
|
||||
{
|
||||
int iLen = strlenW(wszAccel);
|
||||
int iLen = lstrlenW(wszAccel);
|
||||
LPCWSTR lpszStr = TOOLBAR_GetText(infoPtr, btnPtr);
|
||||
|
||||
if (!lpszStr)
|
||||
|
@ -3861,7 +3860,7 @@ TOOLBAR_MapAccelerator (const TOOLBAR_INFO *infoPtr, WCHAR wAccel, UINT *pIDButt
|
|||
lpszStr += 2;
|
||||
continue;
|
||||
}
|
||||
if (!strncmpiW(lpszStr, wszAccel, iLen))
|
||||
if (!wcsnicmp(lpszStr, wszAccel, iLen))
|
||||
{
|
||||
*pIDButton = btnPtr->idCommand;
|
||||
return TRUE;
|
||||
|
@ -5141,7 +5140,7 @@ TOOLBAR_GetStringW (const TOOLBAR_INFO *infoPtr, WPARAM wParam, LPWSTR str)
|
|||
|
||||
if (iString < infoPtr->nNumStrings)
|
||||
{
|
||||
len = min(len, strlenW(infoPtr->strings[iString]));
|
||||
len = min(len, lstrlenW(infoPtr->strings[iString]));
|
||||
ret = (len+1)*sizeof(WCHAR);
|
||||
if (str)
|
||||
{
|
||||
|
@ -6150,7 +6149,7 @@ static LRESULT TOOLBAR_TTGetDispInfo (TOOLBAR_INFO *infoPtr, NMTTDISPINFOW *lpnm
|
|||
|
||||
TRACE("TBN_GETINFOTIPW - got string %s\n", debugstr_w(tbgit.pszText));
|
||||
|
||||
len = strlenW(tbgit.pszText);
|
||||
len = lstrlenW(tbgit.pszText);
|
||||
if (len > ARRAY_SIZE(lpnmtdi->szText) - 1)
|
||||
{
|
||||
/* need to allocate temporary buffer in infoPtr as there
|
||||
|
@ -6214,7 +6213,7 @@ static LRESULT TOOLBAR_TTGetDispInfo (TOOLBAR_INFO *infoPtr, NMTTDISPINFOW *lpnm
|
|||
!(infoPtr->buttons[index].fsStyle & BTNS_SHOWTEXT))
|
||||
{
|
||||
LPWSTR pszText = TOOLBAR_GetText(infoPtr, &infoPtr->buttons[index]);
|
||||
len = pszText ? strlenW(pszText) : 0;
|
||||
len = pszText ? lstrlenW(pszText) : 0;
|
||||
|
||||
TRACE("using button hidden text %s\n", debugstr_w(pszText));
|
||||
|
||||
|
|
|
@ -96,7 +96,6 @@
|
|||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "wingdi.h"
|
||||
#include "winuser.h"
|
||||
#include "winnls.h"
|
||||
|
@ -502,7 +501,7 @@ TOOLTIPS_GetTipText (const TOOLTIPS_INFO *infoPtr, INT nTool, WCHAR *buffer)
|
|||
|
||||
if (!(GetWindowLongW(infoPtr->hwndSelf, GWL_STYLE) & TTS_NOPREFIX)) {
|
||||
WCHAR *ptrW;
|
||||
if ((ptrW = strchrW(buffer, '\t')))
|
||||
if ((ptrW = wcschr(buffer, '\t')))
|
||||
*ptrW = 0;
|
||||
}
|
||||
|
||||
|
@ -963,7 +962,7 @@ TOOLTIPS_CopyInfoT (const TOOLTIPS_INFO *infoPtr, INT index, TTTOOLINFOW *ti, BO
|
|||
toolPtr->lpszText == LPSTR_TEXTCALLBACKW)
|
||||
ti->lpszText = toolPtr->lpszText;
|
||||
else if (isW)
|
||||
strcpyW (ti->lpszText, toolPtr->lpszText);
|
||||
lstrcpyW (ti->lpszText, toolPtr->lpszText);
|
||||
else
|
||||
/* ANSI version, the buffer is maximum 80 bytes without null. */
|
||||
WideCharToMultiByte(CP_ACP, 0, toolPtr->lpszText, -1,
|
||||
|
@ -1090,7 +1089,7 @@ TOOLTIPS_AddToolT (TOOLTIPS_INFO *infoPtr, const TTTOOLINFOW *ti, BOOL isW)
|
|||
INT len = lstrlenW (ti->lpszText);
|
||||
TRACE("add text %s\n", debugstr_w(ti->lpszText));
|
||||
toolPtr->lpszText = Alloc ((len + 1)*sizeof(WCHAR));
|
||||
strcpyW (toolPtr->lpszText, ti->lpszText);
|
||||
lstrcpyW (toolPtr->lpszText, ti->lpszText);
|
||||
}
|
||||
else {
|
||||
INT len = MultiByteToWideChar(CP_ACP, 0, (LPSTR)ti->lpszText, -1, NULL, 0);
|
||||
|
@ -1167,7 +1166,7 @@ static void TOOLTIPS_SetToolText(TTTOOL_INFO *toolPtr, WCHAR *text, BOOL is_unic
|
|||
len = lstrlenW(text);
|
||||
toolPtr->lpszText = Alloc ((len + 1) * sizeof(WCHAR));
|
||||
if (toolPtr->lpszText)
|
||||
strcpyW (toolPtr->lpszText, text);
|
||||
lstrcpyW (toolPtr->lpszText, text);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1640,7 +1639,7 @@ TOOLTIPS_SetTitleT (TOOLTIPS_INFO *infoPtr, UINT_PTR uTitleIcon, LPCWSTR pszTitl
|
|||
{
|
||||
if (isW)
|
||||
{
|
||||
size = (strlenW(pszTitle)+1)*sizeof(WCHAR);
|
||||
size = (lstrlenW(pszTitle)+1)*sizeof(WCHAR);
|
||||
infoPtr->pszTitle = Alloc(size);
|
||||
if (!infoPtr->pszTitle)
|
||||
return FALSE;
|
||||
|
@ -1977,7 +1976,7 @@ TOOLTIPS_SetFont (TOOLTIPS_INFO *infoPtr, HFONT hFont, BOOL redraw)
|
|||
static inline LRESULT
|
||||
TOOLTIPS_GetTextLength(const TOOLTIPS_INFO *infoPtr)
|
||||
{
|
||||
return strlenW(infoPtr->szTipText);
|
||||
return lstrlenW(infoPtr->szTipText);
|
||||
}
|
||||
|
||||
/******************************************************************
|
||||
|
@ -1999,7 +1998,7 @@ TOOLTIPS_OnWMGetText (const TOOLTIPS_INFO *infoPtr, WPARAM size, LPWSTR pszText)
|
|||
if(!size)
|
||||
return 0;
|
||||
|
||||
res = min(strlenW(infoPtr->szTipText)+1, size);
|
||||
res = min(lstrlenW(infoPtr->szTipText)+1, size);
|
||||
memcpy(pszText, infoPtr->szTipText, res*sizeof(WCHAR));
|
||||
pszText[res-1] = '\0';
|
||||
return res-1;
|
||||
|
|
|
@ -1121,7 +1121,7 @@ TRACKBAR_GetNumTics (const TRACKBAR_INFO *infoPtr)
|
|||
}
|
||||
|
||||
|
||||
static int comp_tics (const void *ap, const void *bp)
|
||||
static int __cdecl comp_tics (const void *ap, const void *bp)
|
||||
{
|
||||
const DWORD a = *(const DWORD *)ap;
|
||||
const DWORD b = *(const DWORD *)bp;
|
||||
|
|
|
@ -40,9 +40,6 @@
|
|||
* Scroll (instead of repaint) as much as possible.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "wine/port.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
#include <stdarg.h>
|
||||
|
@ -61,7 +58,6 @@
|
|||
#include "comctl32.h"
|
||||
#include "uxtheme.h"
|
||||
#include "vssym32.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "wine/debug.h"
|
||||
#include "wine/exception.h"
|
||||
#include "wine/heap.h"
|
||||
|
@ -766,7 +762,7 @@ TREEVIEW_UpdateDispInfo(const TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *item,
|
|||
if (newText)
|
||||
{
|
||||
item->pszText = newText;
|
||||
strcpyW(item->pszText, callback.item.pszText);
|
||||
lstrcpyW(item->pszText, callback.item.pszText);
|
||||
item->cchTextMax = len;
|
||||
}
|
||||
/* If realloc fails we have nothing to do, but keep original text */
|
||||
|
@ -901,7 +897,7 @@ TREEVIEW_ComputeTextWidth(const TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *item, HDC
|
|||
hOldFont = SelectObject(hdc, TREEVIEW_FontForItem(infoPtr, item));
|
||||
}
|
||||
|
||||
GetTextExtentPoint32W(hdc, item->pszText, strlenW(item->pszText), &sz);
|
||||
GetTextExtentPoint32W(hdc, item->pszText, lstrlenW(item->pszText), &sz);
|
||||
item->textWidth = sz.cx;
|
||||
|
||||
if (hDC == 0)
|
||||
|
@ -2674,7 +2670,7 @@ TREEVIEW_DrawItem(const TREEVIEW_INFO *infoPtr, HDC hdc, TREEVIEW_ITEM *item)
|
|||
debugstr_w(item->pszText), wine_dbgstr_rect(&rcText));
|
||||
|
||||
/* Draw it */
|
||||
GetTextExtentPoint32W(hdc, item->pszText, strlenW(item->pszText), &sz);
|
||||
GetTextExtentPoint32W(hdc, item->pszText, lstrlenW(item->pszText), &sz);
|
||||
|
||||
align = SetTextAlign(hdc, TA_LEFT | TA_TOP);
|
||||
ExtTextOutW(hdc, rcText.left + 2, (rcText.top + rcText.bottom - sz.cy) / 2,
|
||||
|
@ -3845,7 +3841,7 @@ TREEVIEW_Command(TREEVIEW_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
|
|||
hOldFont = SelectObject(hdc, hFont);
|
||||
}
|
||||
|
||||
if (GetTextExtentPoint32W(hdc, buffer, strlenW(buffer), &sz))
|
||||
if (GetTextExtentPoint32W(hdc, buffer, lstrlenW(buffer), &sz))
|
||||
{
|
||||
TEXTMETRICW textMetric;
|
||||
|
||||
|
@ -3925,7 +3921,7 @@ TREEVIEW_EditLabel(TREEVIEW_INFO *infoPtr, HTREEITEM hItem)
|
|||
|
||||
/* Get string length in pixels */
|
||||
if (hItem->pszText)
|
||||
GetTextExtentPoint32W(hdc, hItem->pszText, strlenW(hItem->pszText),
|
||||
GetTextExtentPoint32W(hdc, hItem->pszText, lstrlenW(hItem->pszText),
|
||||
&sz);
|
||||
else
|
||||
GetTextExtentPoint32A(hdc, "", 0, &sz);
|
||||
|
@ -4041,7 +4037,7 @@ TREEVIEW_EndEditLabelNow(TREEVIEW_INFO *infoPtr, BOOL bCancel)
|
|||
iLength = len - 1;
|
||||
}
|
||||
|
||||
if (strcmpW(newText, editedItem->pszText) != 0)
|
||||
if (lstrcmpW(newText, editedItem->pszText) != 0)
|
||||
{
|
||||
WCHAR *ptr = heap_realloc(editedItem->pszText, sizeof(WCHAR)*(iLength + 1));
|
||||
if (ptr == NULL)
|
||||
|
@ -4057,7 +4053,7 @@ TREEVIEW_EndEditLabelNow(TREEVIEW_INFO *infoPtr, BOOL bCancel)
|
|||
{
|
||||
editedItem->pszText = ptr;
|
||||
editedItem->cchTextMax = iLength + 1;
|
||||
strcpyW(editedItem->pszText, newText);
|
||||
lstrcpyW(editedItem->pszText, newText);
|
||||
TREEVIEW_ComputeTextWidth(infoPtr, editedItem, 0);
|
||||
}
|
||||
}
|
||||
|
@ -4417,7 +4413,7 @@ TREEVIEW_CreateDragImage(TREEVIEW_INFO *infoPtr, LPARAM lParam)
|
|||
hOldFont = SelectObject(hdc, infoPtr->hFont);
|
||||
|
||||
if (dragItem->pszText)
|
||||
GetTextExtentPoint32W(hdc, dragItem->pszText, strlenW(dragItem->pszText),
|
||||
GetTextExtentPoint32W(hdc, dragItem->pszText, lstrlenW(dragItem->pszText),
|
||||
&size);
|
||||
else
|
||||
GetTextExtentPoint32A(hdc, "", 0, &size);
|
||||
|
@ -4445,7 +4441,7 @@ TREEVIEW_CreateDragImage(TREEVIEW_INFO *infoPtr, LPARAM lParam)
|
|||
SetRect(&rc, cx, 0, size.cx, size.cy);
|
||||
|
||||
if (dragItem->pszText)
|
||||
DrawTextW(hdc, dragItem->pszText, strlenW(dragItem->pszText), &rc,
|
||||
DrawTextW(hdc, dragItem->pszText, lstrlenW(dragItem->pszText), &rc,
|
||||
DT_LEFT);
|
||||
|
||||
SelectObject(hdc, hOldFont);
|
||||
|
@ -4698,12 +4694,12 @@ static INT TREEVIEW_ProcessLetterKeys(TREEVIEW_INFO *infoPtr, WPARAM charCode, L
|
|||
TREEVIEW_GetItemT( infoPtr, &item, TRUE );
|
||||
|
||||
/* check for a match */
|
||||
if (strncmpiW(item.pszText,infoPtr->szSearchParam,infoPtr->nSearchParamLength) == 0) {
|
||||
if (wcsnicmp(item.pszText,infoPtr->szSearchParam,infoPtr->nSearchParamLength) == 0) {
|
||||
nItem=idx;
|
||||
break;
|
||||
} else if ( (charCode != 0) && (nItem == NULL) &&
|
||||
(nItem != infoPtr->selectedItem) &&
|
||||
(strncmpiW(item.pszText,infoPtr->szSearchParam,1) == 0) ) {
|
||||
(wcsnicmp(item.pszText,infoPtr->szSearchParam,1) == 0) ) {
|
||||
/* This would work but we must keep looking for a longer match */
|
||||
nItem=idx;
|
||||
}
|
||||
|
|
|
@ -34,7 +34,6 @@
|
|||
#include "uxtheme.h"
|
||||
#include "vssym32.h"
|
||||
#include "wine/heap.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(updown);
|
||||
|
@ -288,7 +287,7 @@ static BOOL UPDOWN_GetBuddyInt (UPDOWN_INFO *infoPtr)
|
|||
*dst = 0;
|
||||
|
||||
/* try to convert the number and validate it */
|
||||
newVal = strtolW(txt, &src, infoPtr->Base);
|
||||
newVal = wcstol(txt, &src, infoPtr->Base);
|
||||
if(*src || !UPDOWN_InBounds (infoPtr, newVal)) return FALSE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue