Author: tkreuzer
Date: Sat Feb 16 11:46:05 2013
New Revision: 58316
URL:
http://svn.reactos.org/svn/reactos?rev=58316&view=rev
Log:
[FONTVIEW]
Fix some MSVC/x64 warnings
Modified:
trunk/reactos/base/applications/fontview/display.c
trunk/reactos/base/applications/fontview/fontview.c
Modified: trunk/reactos/base/applications/fontview/display.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/fontview…
==============================================================================
--- trunk/reactos/base/applications/fontview/display.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/fontview/display.c [iso-8859-1] Sat Feb 16 11:46:05
2013
@@ -88,7 +88,7 @@
GetTextMetrics(hDC, &tm);
swprintf(szCaption, L"%s%s", pData->szTypeFaceName, pData->szFormat);
- TextOutW(hDC, 0, y, szCaption, wcslen(szCaption));
+ TextOutW(hDC, 0, y, szCaption, (INT)wcslen(szCaption));
y += tm.tmHeight + SPACING1;
/* Draw a seperation Line */
@@ -103,15 +103,15 @@
SelectObject(hDC, pData->hCharSetFont);
GetTextMetrics(hDC, &tm);
swprintf(szCaption, L"abcdefghijklmnopqrstuvwxyz");
- TextOutW(hDC, 0, y, szCaption, wcslen(szCaption));
+ TextOutW(hDC, 0, y, szCaption, (INT)wcslen(szCaption));
y += tm.tmHeight + 1;
swprintf(szCaption, L"ABCDEFGHIJKLMNOPQRSTUVWXYZ");
- TextOutW(hDC, 0, y, szCaption, wcslen(szCaption));
+ TextOutW(hDC, 0, y, szCaption, (INT)wcslen(szCaption));
y += tm.tmHeight + 1;
swprintf(szCaption, L"0123456789.:,;(\"~!@#$%^&*')");
- TextOutW(hDC, 0, y, szCaption, wcslen(szCaption));
+ TextOutW(hDC, 0, y, szCaption, (INT)wcslen(szCaption));
y += tm.tmHeight + 1;
/* Draw a seperation Line */
@@ -124,12 +124,12 @@
for (i = 0; i < MAX_SIZES; i++)
{
SelectObject(hDC, pData->hFonts[i]);
- TextOutW(hDC, 20, y, pData->szString, wcslen(pData->szString));
+ TextOutW(hDC, 20, y, pData->szString, (INT)wcslen(pData->szString));
GetTextMetrics(hDC, &tm);
y += tm.tmHeight + 1;
SelectObject(hDC, pData->hSizeFont);
swprintf(szSize, L"%d", pData->nSizes[i]);
- TextOutW(hDC, 0, y - 13 - tm.tmDescent, szSize, wcslen(szSize));
+ TextOutW(hDC, 0, y - 13 - tm.tmDescent, szSize, (INT)wcslen(szSize));
}
SelectObject(hDC, hOldFont);
@@ -157,7 +157,7 @@
}
return TRUE;
}
-
+
static LRESULT
Display_SetTypeFace(HWND hwnd, PEXTLOGFONTW pExtLogFont)
{
@@ -418,7 +418,7 @@
TEXTMETRIC tm;
int copies, yPos;
DISPLAYDATA* pData;
-
+
pData = malloc(sizeof(DISPLAYDATA));
ZeroMemory(pData, sizeof(DISPLAYDATA));
Modified: trunk/reactos/base/applications/fontview/fontview.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/fontview…
==============================================================================
--- trunk/reactos/base/applications/fontview/fontview.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/fontview/fontview.c [iso-8859-1] Sat Feb 16 11:46:05
2013
@@ -104,14 +104,14 @@
OPENFILENAMEW fontOpen;
WCHAR szFileName[MAX_PATH] = L"";
HLOCAL dialogTitle = NULL;
-
+
/* Gets the title for the dialog box ready */
FormatString(FORMAT_MESSAGE_ALLOCATE_BUFFER,
NULL, IDS_OPEN, 0, (LPWSTR)&dialogTitle, 0, NULL);
-
+
/* Clears out any values of fontOpen before we use it */
ZeroMemory(&fontOpen, sizeof(fontOpen));
-
+
/* Sets up the open dialog box */
fontOpen.lStructSize = sizeof(fontOpen);
fontOpen.hwndOwner = NULL;
@@ -122,7 +122,7 @@
fontOpen.nMaxFile = MAX_PATH;
fontOpen.Flags = OFN_EXPLORER | OFN_FILEMUSTEXIST | OFN_HIDEREADONLY;
fontOpen.lpstrDefExt = L"ttf";
-
+
/* Opens up the Open File dialog box in order to chose a font file. */
if(GetOpenFileNameW(&fontOpen))
{
@@ -133,7 +133,7 @@
exiting the program altogether */
return 0;
}
-
+
LocalFree(dialogTitle);
}
else
@@ -142,7 +142,7 @@
fileName = argv[1];
g_fileName = fileName;
}
-
+
if (!AddFontResourceW(fileName))
{
ErrorMsgBox(0, IDS_ERROR, IDS_ERROR_NOFONT, fileName);
@@ -221,7 +221,7 @@
RemoveFontResourceW(argv[1]);
- return msg.wParam;
+ return (int)msg.wParam;
}
static LRESULT
@@ -326,7 +326,7 @@
MainWnd_OnInstall(HWND hwnd)
{
DWORD fontExists;
-
+
/* First, we have to find out if the font still exists. */
fontExists = GetFileAttributes((LPCSTR)g_fileName);
if (fontExists != 0xFFFFFFFF) /* If the file does not exist */
@@ -334,11 +334,11 @@
ErrorMsgBox(0, IDS_ERROR, IDS_ERROR_NOFONT, g_fileName);
return -1;
}
-
+
//CopyFile(g_fileName, NULL, TRUE);
-
+
MessageBox(hwnd, TEXT("This function is unimplemented"),
TEXT("Unimplemented"), MB_OK);
-
+
return 0;
}