Various application fixes by Jan Roeloffzen, bug #5182, part 2

fontview: remove unused variable
kbswitch: remove unused variables
magnify: remove unused variable
mplay32: DWORD -> MCIERROR, tabs -> spaces
eventvwr: remove unused variable

svn path=/trunk/; revision=47459
This commit is contained in:
Gregor Schneider 2010-05-30 20:25:46 +00:00
parent 63313191f0
commit 81d25d5267
5 changed files with 10 additions and 19 deletions

View file

@ -60,13 +60,10 @@ FormatString(
static void
ErrorMsgBox(HWND hParent, DWORD dwCaptionID, DWORD dwMessageId, ...)
{
HMODULE hModule;
HLOCAL hMemCaption = NULL;
HLOCAL hMemText = NULL;
va_list args;
hModule = GetModuleHandle(NULL);
va_start(args, dwMessageId);
FormatString(FORMAT_MESSAGE_ALLOCATE_BUFFER,
NULL, dwMessageId, 0, (LPWSTR)&hMemText, 0, &args);

View file

@ -33,7 +33,6 @@ CreateTrayIcon(LPTSTR szLCID)
HDC hdc, hdcsrc;
HBITMAP hBitmap, hBmpNew, hBmpOld;
RECT rect;
DWORD bkColor, bkText;
HFONT hFontOld, hFont = NULL;
ICONINFO IconInfo;
HICON hIcon = NULL;
@ -63,8 +62,8 @@ CreateTrayIcon(LPTSTR szLCID)
rect.bottom = 16;
rect.top = 0;
bkColor = SetBkColor(hdc, GetSysColor(COLOR_HIGHLIGHT));
bkText = SetTextColor(hdc, GetSysColor(COLOR_HIGHLIGHTTEXT));
SetBkColor(hdc, GetSysColor(COLOR_HIGHLIGHT));
SetTextColor(hdc, GetSysColor(COLOR_HIGHLIGHTTEXT));
ExtTextOut(hdc, rect.left, rect.top, ETO_OPAQUE, &rect, _T(""), 0, NULL);

View file

@ -295,7 +295,7 @@ void Draw(HDC aDc)
//
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
int wmId, wmEvent;
int wmId;
switch (message)
{
@ -354,7 +354,6 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
break;
case WM_COMMAND:
wmId = LOWORD(wParam);
wmEvent = HIWORD(wParam);
// Parse the menu selections:
switch (wmId)
{

View file

@ -407,7 +407,7 @@ PlayFile(HWND hwnd, LPTSTR lpFileName)
MCI_PLAY_PARMS mciPlay;
TCHAR szLocalFileName[MAX_PATH];
UINT FileType;
DWORD dwError;
MCIERROR mciError;
if (lpFileName == NULL)
{
@ -449,14 +449,14 @@ PlayFile(HWND hwnd, LPTSTR lpFileName)
SetTimer(hwnd, IDT_PLAYTIMER, 100, (TIMERPROC) PlayTimerProc);
dwError = mciSendCommand(wDeviceId, MCI_SEEK, MCI_WAIT | MCI_SEEK_TO_START, 0);
mciSendCommand(wDeviceId, MCI_SEEK, MCI_WAIT | MCI_SEEK_TO_START, 0);
mciPlay.dwCallback = (DWORD_PTR)hwnd;
mciPlay.dwFrom = 0;
mciPlay.dwTo = MaxFilePos;
dwError = mciSendCommand(wDeviceId, MCI_PLAY, MCI_NOTIFY | MCI_FROM | MCI_TO, (DWORD_PTR)&mciPlay);
if (dwError != 0)
mciError = mciSendCommand(wDeviceId, MCI_PLAY, MCI_NOTIFY | MCI_FROM | MCI_TO, (DWORD_PTR)&mciPlay);
if (mciError != 0)
{
MessageBox(hwnd, _T("Can't play!"), NULL, MB_OK);
}
@ -641,12 +641,12 @@ MainWndProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam)
break;
case IDM_ABOUT:
{
{
HICON mplayIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_MAIN));
ShellAbout(hwnd, szAppTitle, 0, mplayIcon);
DeleteObject(mplayIcon);
DeleteObject(mplayIcon);
break;
}
}
case IDM_EXIT:
PostMessage(hwnd, WM_CLOSE, 0, 0);
return 0;

View file

@ -506,7 +506,6 @@ QueryEventMessages(LPWSTR lpMachineName,
DWORD dwRead, dwNeeded, dwThisRecord, dwTotalRecords = 0, dwCurrentRecord = 1, dwRecordsToRead = 0, dwFlags;
LPWSTR lpSourceName;
LPWSTR lpComputerName;
LPWSTR lpEventStr;
LPWSTR lpData;
BOOL bResult = TRUE; /* Read succeeded. */
@ -609,9 +608,6 @@ QueryEventMessages(LPWSTR lpMachineName,
// This ist the data section of the current event
lpData = (LPWSTR)((LPBYTE)pevlr + pevlr->DataOffset);
// This is the text of the current event
lpEventStr = (LPWSTR)((LPBYTE)pevlr + pevlr->StringOffset);
// Compute the event type
EventTimeToSystemTime(pevlr->TimeWritten, &time);