mirror of
https://github.com/reactos/reactos.git
synced 2025-07-23 02:53:38 +00:00
[FONTVIEW]
Fix some MSVC/x64 warnings svn path=/trunk/; revision=58316
This commit is contained in:
parent
413592e946
commit
aa173340b2
2 changed files with 19 additions and 19 deletions
|
@ -88,7 +88,7 @@ Display_DrawText(HDC hDC, DISPLAYDATA* pData, int nYPos)
|
|||
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 @@ Display_DrawText(HDC hDC, DISPLAYDATA* pData, int nYPos)
|
|||
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 @@ Display_DrawText(HDC hDC, DISPLAYDATA* pData, int nYPos)
|
|||
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 @@ EnumFontFamProcW(
|
|||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
static LRESULT
|
||||
Display_SetTypeFace(HWND hwnd, PEXTLOGFONTW pExtLogFont)
|
||||
{
|
||||
|
@ -418,7 +418,7 @@ Display_OnPrint(HWND hwnd)
|
|||
TEXTMETRIC tm;
|
||||
int copies, yPos;
|
||||
DISPLAYDATA* pData;
|
||||
|
||||
|
||||
pData = malloc(sizeof(DISPLAYDATA));
|
||||
ZeroMemory(pData, sizeof(DISPLAYDATA));
|
||||
|
||||
|
|
|
@ -104,14 +104,14 @@ WinMain (HINSTANCE hThisInstance,
|
|||
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 @@ WinMain (HINSTANCE hThisInstance,
|
|||
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 @@ WinMain (HINSTANCE hThisInstance,
|
|||
exiting the program altogether */
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
LocalFree(dialogTitle);
|
||||
}
|
||||
else
|
||||
|
@ -142,7 +142,7 @@ WinMain (HINSTANCE hThisInstance,
|
|||
fileName = argv[1];
|
||||
g_fileName = fileName;
|
||||
}
|
||||
|
||||
|
||||
if (!AddFontResourceW(fileName))
|
||||
{
|
||||
ErrorMsgBox(0, IDS_ERROR, IDS_ERROR_NOFONT, fileName);
|
||||
|
@ -221,7 +221,7 @@ WinMain (HINSTANCE hThisInstance,
|
|||
|
||||
RemoveFontResourceW(argv[1]);
|
||||
|
||||
return msg.wParam;
|
||||
return (int)msg.wParam;
|
||||
}
|
||||
|
||||
static LRESULT
|
||||
|
@ -326,7 +326,7 @@ static LRESULT
|
|||
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 @@ MainWnd_OnInstall(HWND hwnd)
|
|||
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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue