From 8e087e40dbe38d815e99a0fd50b1e49b48edef3a Mon Sep 17 00:00:00 2001 From: Maarten Bosma Date: Mon, 1 Jan 2007 21:46:29 +0000 Subject: [PATCH] Set explicitly set default icon when adding item to the applications tree view. Workaround for reactos bug. svn path=/trunk/; revision=25270 --- reactos/base/applications/downloader/main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/reactos/base/applications/downloader/main.c b/reactos/base/applications/downloader/main.c index d4a8994df11..21dc1c8f55b 100644 --- a/reactos/base/applications/downloader/main.c +++ b/reactos/base/applications/downloader/main.c @@ -79,9 +79,10 @@ void CategoryChoosen (HWND hwnd, struct Category* Category) (void)TreeView_DeleteItem(hwnd, TVI_ROOT); (void)TreeView_DeleteItem(hwnd, TVI_ROOT); // Delete twice to bypass bug in windows - Insert.item.mask = TVIF_TEXT|TVIF_PARAM; + Insert.item.mask = TVIF_TEXT|TVIF_PARAM|TVIF_IMAGE; Insert.hInsertAfter = TVI_LAST; Insert.hParent = TVI_ROOT; + Insert.item.iImage = 0; CurrentApplication = Category->Apps; @@ -124,9 +125,10 @@ BOOL SetupControls (HWND hwnd) SendMessageW(hDownloadButton, BM_SETIMAGE, (WPARAM)IMAGE_BITMAP,(LPARAM)(HANDLE)LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_DOWNLOAD))); // Set deflaut entry for hApps - Insert.item.mask = TVIF_TEXT; + Insert.item.mask = TVIF_TEXT|TVIF_IMAGE; Insert.item.pszText = Strings[IDS_CHOOSE_CATEGORY]; Insert.item.cchTextMax = lstrlenW(Strings[IDS_CHOOSE_CATEGORY]); + Insert.item.iImage = 0; SendMessage(hApps, TVM_INSERTITEM, 0, (LPARAM)&Insert); // Create Tree Icons