Commit 423079eb authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

taskmgr: Fix some gcc 4.1 warnings caused by commctrl.h macros.

parent fab2e562
...@@ -98,15 +98,19 @@ ApplicationPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) ...@@ -98,15 +98,19 @@ ApplicationPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
_tcscpy(szTemp, _T("Task")); _tcscpy(szTemp, _T("Task"));
column.pszText = szTemp; column.pszText = szTemp;
column.cx = 250; column.cx = 250;
ListView_InsertColumn(hApplicationPageListCtrl, 0, &column); /* Add the "Task" column */ /* Add the "Task" column */
SendMessage(hApplicationPageListCtrl, LVM_INSERTCOLUMN, 0, (LPARAM) &column);
column.mask = LVCF_TEXT|LVCF_WIDTH; column.mask = LVCF_TEXT|LVCF_WIDTH;
_tcscpy(szTemp, _T("Status")); _tcscpy(szTemp, _T("Status"));
column.pszText = szTemp; column.pszText = szTemp;
column.cx = 95; column.cx = 95;
ListView_InsertColumn(hApplicationPageListCtrl, 1, &column); /* Add the "Status" column */ /* Add the "Status" column */
SendMessage(hApplicationPageListCtrl, LVM_INSERTCOLUMN, 1, (LPARAM) &column);
ListView_SetImageList(hApplicationPageListCtrl, ImageList_Create(16, 16, ILC_COLOR8|ILC_MASK, 0, 1), LVSIL_SMALL); SendMessage(hApplicationPageListCtrl, LVM_SETIMAGELIST, LVSIL_SMALL,
ListView_SetImageList(hApplicationPageListCtrl, ImageList_Create(32, 32, ILC_COLOR8|ILC_MASK, 0, 1), LVSIL_NORMAL); (LPARAM) ImageList_Create(16, 16, ILC_COLOR8|ILC_MASK, 0, 1));
SendMessage(hApplicationPageListCtrl, LVM_SETIMAGELIST, LVSIL_NORMAL,
(LPARAM) ImageList_Create(32, 32, ILC_COLOR8|ILC_MASK, 0, 1));
UpdateApplicationListControlViewSetting(); UpdateApplicationListControlViewSetting();
...@@ -330,7 +334,7 @@ void AddOrUpdateHwnd(HWND hWnd, TCHAR *szTitle, HICON hIcon, BOOL bHung) ...@@ -330,7 +334,7 @@ void AddOrUpdateHwnd(HWND hWnd, TCHAR *szTitle, HICON hIcon, BOOL bHung)
memset(&item, 0, sizeof(LV_ITEM)); memset(&item, 0, sizeof(LV_ITEM));
item.mask = LVIF_IMAGE|LVIF_PARAM; item.mask = LVIF_IMAGE|LVIF_PARAM;
item.iItem = i; item.iItem = i;
ListView_GetItem(hApplicationPageListCtrl, &item); SendMessage(hApplicationPageListCtrl, LVM_GETITEM, 0, (LPARAM) &item);
pAPLI = (LPAPPLICATION_PAGE_LIST_ITEM)item.lParam; pAPLI = (LPAPPLICATION_PAGE_LIST_ITEM)item.lParam;
if (pAPLI->hWnd == hWnd) if (pAPLI->hWnd == hWnd)
...@@ -358,7 +362,7 @@ void AddOrUpdateHwnd(HWND hWnd, TCHAR *szTitle, HICON hIcon, BOOL bHung) ...@@ -358,7 +362,7 @@ void AddOrUpdateHwnd(HWND hWnd, TCHAR *szTitle, HICON hIcon, BOOL bHung)
ImageList_ReplaceIcon(hImageListSmall, item.iItem, hIcon); ImageList_ReplaceIcon(hImageListSmall, item.iItem, hIcon);
/* Update the list view */ /* Update the list view */
ListView_RedrawItems(hApplicationPageListCtrl, 0, ListView_GetItemCount(hApplicationPageListCtrl)); SendMessage(hApplicationPageListCtrl, LVM_REDRAWITEMS, 0, ListView_GetItemCount(hApplicationPageListCtrl));
/* UpdateWindow(hApplicationPageListCtrl); */ /* UpdateWindow(hApplicationPageListCtrl); */
InvalidateRect(hApplicationPageListCtrl, NULL, 0); InvalidateRect(hApplicationPageListCtrl, NULL, 0);
} }
...@@ -381,7 +385,7 @@ void AddOrUpdateHwnd(HWND hWnd, TCHAR *szTitle, HICON hIcon, BOOL bHung) ...@@ -381,7 +385,7 @@ void AddOrUpdateHwnd(HWND hWnd, TCHAR *szTitle, HICON hIcon, BOOL bHung)
item.pszText = LPSTR_TEXTCALLBACK; item.pszText = LPSTR_TEXTCALLBACK;
item.iItem = ListView_GetItemCount(hApplicationPageListCtrl); item.iItem = ListView_GetItemCount(hApplicationPageListCtrl);
item.lParam = (LPARAM)pAPLI; item.lParam = (LPARAM)pAPLI;
ListView_InsertItem(hApplicationPageListCtrl, &item); SendMessage(hApplicationPageListCtrl, LVM_INSERTITEM, 0, (LPARAM) &item);
} }
...@@ -391,7 +395,7 @@ void AddOrUpdateHwnd(HWND hWnd, TCHAR *szTitle, HICON hIcon, BOOL bHung) ...@@ -391,7 +395,7 @@ void AddOrUpdateHwnd(HWND hWnd, TCHAR *szTitle, HICON hIcon, BOOL bHung)
memset(&item, 0, sizeof(LV_ITEM)); memset(&item, 0, sizeof(LV_ITEM));
item.mask = LVIF_IMAGE|LVIF_PARAM; item.mask = LVIF_IMAGE|LVIF_PARAM;
item.iItem = i; item.iItem = i;
ListView_GetItem(hApplicationPageListCtrl, &item); SendMessage(hApplicationPageListCtrl, LVM_GETITEM, 0, (LPARAM) &item);
pAPLI = (LPAPPLICATION_PAGE_LIST_ITEM)item.lParam; pAPLI = (LPAPPLICATION_PAGE_LIST_ITEM)item.lParam;
if (!IsWindow(pAPLI->hWnd)|| if (!IsWindow(pAPLI->hWnd)||
...@@ -404,7 +408,7 @@ void AddOrUpdateHwnd(HWND hWnd, TCHAR *szTitle, HICON hIcon, BOOL bHung) ...@@ -404,7 +408,7 @@ void AddOrUpdateHwnd(HWND hWnd, TCHAR *szTitle, HICON hIcon, BOOL bHung)
ImageList_Remove(hImageListLarge, item.iItem); ImageList_Remove(hImageListLarge, item.iItem);
ImageList_Remove(hImageListSmall, item.iItem); ImageList_Remove(hImageListSmall, item.iItem);
ListView_DeleteItem(hApplicationPageListCtrl, item.iItem); SendMessage(hApplicationPageListCtrl, LVM_DELETEITEM, item.iItem, 0);
free(pAPLI); free(pAPLI);
bItemRemoved = TRUE; bItemRemoved = TRUE;
} }
...@@ -423,7 +427,7 @@ void AddOrUpdateHwnd(HWND hWnd, TCHAR *szTitle, HICON hIcon, BOOL bHung) ...@@ -423,7 +427,7 @@ void AddOrUpdateHwnd(HWND hWnd, TCHAR *szTitle, HICON hIcon, BOOL bHung)
item.mask = LVIF_IMAGE; item.mask = LVIF_IMAGE;
item.iItem = i; item.iItem = i;
item.iImage = i; item.iImage = i;
ListView_SetItem(hApplicationPageListCtrl, &item); SendMessage(hApplicationPageListCtrl, LVM_SETITEM, 0, (LPARAM) &item);
} }
} }
...@@ -566,7 +570,7 @@ void ApplicationPageOnNotify(WPARAM wParam, LPARAM lParam) ...@@ -566,7 +570,7 @@ void ApplicationPageOnNotify(WPARAM wParam, LPARAM lParam)
case HDN_ITEMCLICK: case HDN_ITEMCLICK:
ListView_SortItems(hApplicationPageListCtrl, ApplicationPageCompareFunc, 0); SendMessage(hApplicationPageListCtrl, LVM_SORTITEMS, 0, (LPARAM) ApplicationPageCompareFunc);
bSortAscending = !bSortAscending; bSortAscending = !bSortAscending;
break; break;
...@@ -708,7 +712,7 @@ void ApplicationPage_OnWindowsTileHorizontally(void) ...@@ -708,7 +712,7 @@ void ApplicationPage_OnWindowsTileHorizontally(void)
item.mask = LVIF_STATE|LVIF_PARAM; item.mask = LVIF_STATE|LVIF_PARAM;
item.iItem = i; item.iItem = i;
item.stateMask = (UINT)-1; item.stateMask = (UINT)-1;
ListView_GetItem(hApplicationPageListCtrl, &item); SendMessage(hApplicationPageListCtrl, LVM_GETITEM, 0, (LPARAM) &item);
if (item.state & LVIS_SELECTED) { if (item.state & LVIS_SELECTED) {
pAPLI = (LPAPPLICATION_PAGE_LIST_ITEM)item.lParam; pAPLI = (LPAPPLICATION_PAGE_LIST_ITEM)item.lParam;
...@@ -739,7 +743,7 @@ void ApplicationPage_OnWindowsTileVertically(void) ...@@ -739,7 +743,7 @@ void ApplicationPage_OnWindowsTileVertically(void)
item.mask = LVIF_STATE|LVIF_PARAM; item.mask = LVIF_STATE|LVIF_PARAM;
item.iItem = i; item.iItem = i;
item.stateMask = (UINT)-1; item.stateMask = (UINT)-1;
ListView_GetItem(hApplicationPageListCtrl, &item); SendMessage(hApplicationPageListCtrl, LVM_GETITEM, 0, (LPARAM) &item);
if (item.state & LVIS_SELECTED) { if (item.state & LVIS_SELECTED) {
pAPLI = (LPAPPLICATION_PAGE_LIST_ITEM)item.lParam; pAPLI = (LPAPPLICATION_PAGE_LIST_ITEM)item.lParam;
...@@ -765,7 +769,7 @@ void ApplicationPage_OnWindowsMinimize(void) ...@@ -765,7 +769,7 @@ void ApplicationPage_OnWindowsMinimize(void)
item.mask = LVIF_STATE|LVIF_PARAM; item.mask = LVIF_STATE|LVIF_PARAM;
item.iItem = i; item.iItem = i;
item.stateMask = (UINT)-1; item.stateMask = (UINT)-1;
ListView_GetItem(hApplicationPageListCtrl, &item); SendMessage(hApplicationPageListCtrl, LVM_GETITEM, 0, (LPARAM) &item);
if (item.state & LVIS_SELECTED) { if (item.state & LVIS_SELECTED) {
pAPLI = (LPAPPLICATION_PAGE_LIST_ITEM)item.lParam; pAPLI = (LPAPPLICATION_PAGE_LIST_ITEM)item.lParam;
if (pAPLI) { if (pAPLI) {
...@@ -786,7 +790,7 @@ void ApplicationPage_OnWindowsMaximize(void) ...@@ -786,7 +790,7 @@ void ApplicationPage_OnWindowsMaximize(void)
item.mask = LVIF_STATE|LVIF_PARAM; item.mask = LVIF_STATE|LVIF_PARAM;
item.iItem = i; item.iItem = i;
item.stateMask = (UINT)-1; item.stateMask = (UINT)-1;
ListView_GetItem(hApplicationPageListCtrl, &item); SendMessage(hApplicationPageListCtrl, LVM_GETITEM, 0, (LPARAM) &item);
if (item.state & LVIS_SELECTED) { if (item.state & LVIS_SELECTED) {
pAPLI = (LPAPPLICATION_PAGE_LIST_ITEM)item.lParam; pAPLI = (LPAPPLICATION_PAGE_LIST_ITEM)item.lParam;
if (pAPLI) { if (pAPLI) {
...@@ -812,7 +816,7 @@ void ApplicationPage_OnWindowsCascade(void) ...@@ -812,7 +816,7 @@ void ApplicationPage_OnWindowsCascade(void)
item.mask = LVIF_STATE|LVIF_PARAM; item.mask = LVIF_STATE|LVIF_PARAM;
item.iItem = i; item.iItem = i;
item.stateMask = (UINT)-1; item.stateMask = (UINT)-1;
ListView_GetItem(hApplicationPageListCtrl, &item); SendMessage(hApplicationPageListCtrl, LVM_GETITEM, 0, (LPARAM) &item);
if (item.state & LVIS_SELECTED) { if (item.state & LVIS_SELECTED) {
pAPLI = (LPAPPLICATION_PAGE_LIST_ITEM)item.lParam; pAPLI = (LPAPPLICATION_PAGE_LIST_ITEM)item.lParam;
if (pAPLI) { if (pAPLI) {
...@@ -836,7 +840,7 @@ void ApplicationPage_OnWindowsBringToFront(void) ...@@ -836,7 +840,7 @@ void ApplicationPage_OnWindowsBringToFront(void)
item.mask = LVIF_STATE|LVIF_PARAM; item.mask = LVIF_STATE|LVIF_PARAM;
item.iItem = i; item.iItem = i;
item.stateMask = (UINT)-1; item.stateMask = (UINT)-1;
ListView_GetItem(hApplicationPageListCtrl, &item); SendMessage(hApplicationPageListCtrl, LVM_GETITEM, 0, (LPARAM) &item);
if (item.state & LVIS_SELECTED) { if (item.state & LVIS_SELECTED) {
pAPLI = (LPAPPLICATION_PAGE_LIST_ITEM)item.lParam; pAPLI = (LPAPPLICATION_PAGE_LIST_ITEM)item.lParam;
break; break;
...@@ -860,7 +864,7 @@ void ApplicationPage_OnSwitchTo(void) ...@@ -860,7 +864,7 @@ void ApplicationPage_OnSwitchTo(void)
item.mask = LVIF_STATE|LVIF_PARAM; item.mask = LVIF_STATE|LVIF_PARAM;
item.iItem = i; item.iItem = i;
item.stateMask = (UINT)-1; item.stateMask = (UINT)-1;
ListView_GetItem(hApplicationPageListCtrl, &item); SendMessage(hApplicationPageListCtrl, LVM_GETITEM, 0, (LPARAM) &item);
if (item.state & LVIS_SELECTED) { if (item.state & LVIS_SELECTED) {
pAPLI = (LPAPPLICATION_PAGE_LIST_ITEM)item.lParam; pAPLI = (LPAPPLICATION_PAGE_LIST_ITEM)item.lParam;
...@@ -897,7 +901,7 @@ void ApplicationPage_OnEndTask(void) ...@@ -897,7 +901,7 @@ void ApplicationPage_OnEndTask(void)
item.mask = LVIF_STATE|LVIF_PARAM; item.mask = LVIF_STATE|LVIF_PARAM;
item.iItem = i; item.iItem = i;
item.stateMask = (UINT)-1; item.stateMask = (UINT)-1;
ListView_GetItem(hApplicationPageListCtrl, &item); SendMessage(hApplicationPageListCtrl, LVM_GETITEM, 0, (LPARAM) &item);
if (item.state & LVIS_SELECTED) { if (item.state & LVIS_SELECTED) {
pAPLI = (LPAPPLICATION_PAGE_LIST_ITEM)item.lParam; pAPLI = (LPAPPLICATION_PAGE_LIST_ITEM)item.lParam;
if (pAPLI) { if (pAPLI) {
...@@ -919,7 +923,7 @@ void ApplicationPage_OnGotoProcess(void) ...@@ -919,7 +923,7 @@ void ApplicationPage_OnGotoProcess(void)
item.mask = LVIF_STATE|LVIF_PARAM; item.mask = LVIF_STATE|LVIF_PARAM;
item.iItem = i; item.iItem = i;
item.stateMask = (UINT)-1; item.stateMask = (UINT)-1;
ListView_GetItem(hApplicationPageListCtrl, &item); SendMessage(hApplicationPageListCtrl, LVM_GETITEM, 0, (LPARAM) &item);
if (item.state & LVIS_SELECTED) { if (item.state & LVIS_SELECTED) {
pAPLI = (LPAPPLICATION_PAGE_LIST_ITEM)item.lParam; pAPLI = (LPAPPLICATION_PAGE_LIST_ITEM)item.lParam;
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment