Fixed warning messages ans set -Werror in make file.

svn path=/trunk/; revision=10421
This commit is contained in:
James Tabor 2004-08-08 18:46:25 +00:00
parent 32b533c632
commit 3c977fea43
4 changed files with 14 additions and 16 deletions

View file

@ -74,7 +74,7 @@ LRESULT CALLBACK ApplicationPageWndProc(HWND hDlg, UINT message, WPARAM wParam,
LV_COLUMN column; LV_COLUMN column;
TCHAR szTemp[256]; TCHAR szTemp[256];
int cx, cy; int cx, cy;
switch (message) { switch (message) {
case WM_INITDIALOG: case WM_INITDIALOG:
@ -159,21 +159,21 @@ LRESULT CALLBACK ApplicationPageWndProc(HWND hDlg, UINT message, WPARAM wParam,
InvalidateRect(hApplicationPageListCtrl, NULL, TRUE); InvalidateRect(hApplicationPageListCtrl, NULL, TRUE);
GetClientRect(hApplicationPageEndTaskButton, &rc); GetClientRect(hApplicationPageEndTaskButton, &rc);
MapWindowPoints(hApplicationPageEndTaskButton, hDlg, (LPPOINT)(&rc), (sizeof(RECT)/sizeof(POINT)) ); MapWindowPoints(hApplicationPageEndTaskButton, hDlg, (LPPOINT)(PRECT)(&rc), (sizeof(RECT)/sizeof(POINT)) );
cx = rc.left + nXDifference; cx = rc.left + nXDifference;
cy = rc.top + nYDifference; cy = rc.top + nYDifference;
SetWindowPos(hApplicationPageEndTaskButton, NULL, cx, cy, 0, 0, SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOSIZE|SWP_NOZORDER); SetWindowPos(hApplicationPageEndTaskButton, NULL, cx, cy, 0, 0, SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOSIZE|SWP_NOZORDER);
InvalidateRect(hApplicationPageEndTaskButton, NULL, TRUE); InvalidateRect(hApplicationPageEndTaskButton, NULL, TRUE);
GetClientRect(hApplicationPageSwitchToButton, &rc); GetClientRect(hApplicationPageSwitchToButton, &rc);
MapWindowPoints(hApplicationPageSwitchToButton, hDlg, (LPPOINT)(&rc), (sizeof(RECT)/sizeof(POINT)) ); MapWindowPoints(hApplicationPageSwitchToButton, hDlg, (LPPOINT)(PRECT)(&rc), (sizeof(RECT)/sizeof(POINT)) );
cx = rc.left + nXDifference; cx = rc.left + nXDifference;
cy = rc.top + nYDifference; cy = rc.top + nYDifference;
SetWindowPos(hApplicationPageSwitchToButton, NULL, cx, cy, 0, 0, SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOSIZE|SWP_NOZORDER); SetWindowPos(hApplicationPageSwitchToButton, NULL, cx, cy, 0, 0, SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOSIZE|SWP_NOZORDER);
InvalidateRect(hApplicationPageSwitchToButton, NULL, TRUE); InvalidateRect(hApplicationPageSwitchToButton, NULL, TRUE);
GetClientRect(hApplicationPageNewTaskButton, &rc); GetClientRect(hApplicationPageNewTaskButton, &rc);
MapWindowPoints(hApplicationPageNewTaskButton, hDlg, (LPPOINT)(&rc), (sizeof(RECT)/sizeof(POINT)) ); MapWindowPoints(hApplicationPageNewTaskButton, hDlg, (LPPOINT)(PRECT)(&rc), (sizeof(RECT)/sizeof(POINT)) );
cx = rc.left + nXDifference; cx = rc.left + nXDifference;
cy = rc.top + nYDifference; cy = rc.top + nYDifference;
SetWindowPos(hApplicationPageNewTaskButton, NULL, cx, cy, 0, 0, SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOSIZE|SWP_NOZORDER); SetWindowPos(hApplicationPageNewTaskButton, NULL, cx, cy, 0, 0, SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOSIZE|SWP_NOZORDER);
@ -260,6 +260,8 @@ BOOL CALLBACK EnumWindowsProc(HWND hWnd, LPARAM lParam)
TCHAR szText[260]; TCHAR szText[260];
BOOL bLargeIcon; BOOL bLargeIcon;
BOOL bHung = FALSE; BOOL bHung = FALSE;
HICON* xhIcon = (HICON*)&hIcon;
typedef int (FAR __stdcall *IsHungAppWindowProc)(HWND); typedef int (FAR __stdcall *IsHungAppWindowProc)(HWND);
IsHungAppWindowProc IsHungAppWindow; IsHungAppWindowProc IsHungAppWindow;
@ -284,14 +286,14 @@ BOOL CALLBACK EnumWindowsProc(HWND hWnd, LPARAM lParam)
/* Get the icon for this window */ /* Get the icon for this window */
hIcon = NULL; hIcon = NULL;
SendMessageTimeout(hWnd, WM_GETICON, bLargeIcon ? ICON_BIG /*1*/ : ICON_SMALL /*0*/, 0, 0, 1000, (unsigned long*)&hIcon); SendMessageTimeout(hWnd, WM_GETICON,bLargeIcon ? ICON_BIG /*1*/ : ICON_SMALL /*0*/, 0, 0, 1000, (PDWORD_PTR)xhIcon);
if (!hIcon) if (!hIcon)
{ {
hIcon = (HICON)GetClassLong(hWnd, bLargeIcon ? GCL_HICON : GCL_HICONSM); hIcon = (HICON)GetClassLong(hWnd, bLargeIcon ? GCL_HICON : GCL_HICONSM);
if (!hIcon) hIcon = (HICON)GetClassLong(hWnd, bLargeIcon ? GCL_HICONSM : GCL_HICON); if (!hIcon) hIcon = (HICON)GetClassLong(hWnd, bLargeIcon ? GCL_HICONSM : GCL_HICON);
if (!hIcon) SendMessageTimeout(hWnd, WM_QUERYDRAGICON, 0, 0, 0, 1000, (unsigned long*)&hIcon); if (!hIcon) SendMessageTimeout(hWnd, WM_QUERYDRAGICON, 0, 0, 0, 1000, (PDWORD_PTR)xhIcon);
if (!hIcon) SendMessageTimeout(hWnd, WM_GETICON, bLargeIcon ? ICON_SMALL /*0*/ : ICON_BIG /*1*/, 0, 0, 1000, (unsigned long*)&hIcon); if (!hIcon) SendMessageTimeout(hWnd, WM_GETICON, bLargeIcon ? ICON_SMALL /*0*/ : ICON_BIG /*1*/, 0, 0, 1000, (PDWORD_PTR)xhIcon);
} }
if (!hIcon) if (!hIcon)

View file

@ -12,13 +12,9 @@ TARGET_APPTYPE = windows
TARGET_NAME = taskmgr TARGET_NAME = taskmgr
TARGET_CFLAGS = -DDBG -D_WIN32_IE=0x0501 -D_WIN32_WINNT=0x0501 -D__USE_W32API TARGET_CFLAGS = -Werror -Wall -DDBG -D_WIN32_IE=0x0501 -D_WIN32_WINNT=0x0501 -D__USE_W32API
TARGET_SDKLIBS = \ TARGET_SDKLIBS = ntdll.a kernel32.a user32.a gdi32.a comctl32.a
kernel32.a \
user32.a \
gdi32.a \
comctl32.a
TARGET_OBJECTS = \ TARGET_OBJECTS = \
about.o \ about.o \

View file

@ -78,7 +78,7 @@ void AdjustFrameSize(HWND hCntrl, HWND hDlg, int nXDifference, int nYDifference,
int cx, cy, sx, sy; int cx, cy, sx, sy;
GetClientRect(hCntrl, &rc); GetClientRect(hCntrl, &rc);
MapWindowPoints(hCntrl, hDlg, (LPPOINT)(&rc), (sizeof(RECT)/sizeof(POINT))); MapWindowPoints(hCntrl, hDlg, (LPPOINT)(PRECT)(&rc), (sizeof(RECT)/sizeof(POINT)));
if (pos) { if (pos) {
cx = rc.left; cx = rc.left;
cy = rc.top; cy = rc.top;

View file

@ -132,14 +132,14 @@ LRESULT CALLBACK ProcessPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPAR
InvalidateRect(hProcessPageListCtrl, NULL, TRUE); InvalidateRect(hProcessPageListCtrl, NULL, TRUE);
GetClientRect(hProcessPageEndProcessButton, &rc); GetClientRect(hProcessPageEndProcessButton, &rc);
MapWindowPoints(hProcessPageEndProcessButton, hDlg, (LPPOINT)(&rc), (sizeof(RECT)/sizeof(POINT)) ); MapWindowPoints(hProcessPageEndProcessButton, hDlg, (LPPOINT)(PRECT)(&rc), (sizeof(RECT)/sizeof(POINT)) );
cx = rc.left + nXDifference; cx = rc.left + nXDifference;
cy = rc.top + nYDifference; cy = rc.top + nYDifference;
SetWindowPos(hProcessPageEndProcessButton, NULL, cx, cy, 0, 0, SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOSIZE|SWP_NOZORDER); SetWindowPos(hProcessPageEndProcessButton, NULL, cx, cy, 0, 0, SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOSIZE|SWP_NOZORDER);
InvalidateRect(hProcessPageEndProcessButton, NULL, TRUE); InvalidateRect(hProcessPageEndProcessButton, NULL, TRUE);
GetClientRect(hProcessPageShowAllProcessesButton, &rc); GetClientRect(hProcessPageShowAllProcessesButton, &rc);
MapWindowPoints(hProcessPageShowAllProcessesButton, hDlg, (LPPOINT)(&rc), (sizeof(RECT)/sizeof(POINT)) ); MapWindowPoints(hProcessPageShowAllProcessesButton, hDlg, (LPPOINT)(PRECT)(&rc), (sizeof(RECT)/sizeof(POINT)) );
cx = rc.left; cx = rc.left;
cy = rc.top + nYDifference; cy = rc.top + nYDifference;
SetWindowPos(hProcessPageShowAllProcessesButton, NULL, cx, cy, 0, 0, SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOSIZE|SWP_NOZORDER); SetWindowPos(hProcessPageShowAllProcessesButton, NULL, cx, cy, 0, 0, SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOSIZE|SWP_NOZORDER);