Set explicitly set default icon when adding item to the applications tree view. Worka...
authorMaarten Bosma <maarten@bosma.de>
Mon, 1 Jan 2007 21:46:29 +0000 (21:46 +0000)
committerMaarten Bosma <maarten@bosma.de>
Mon, 1 Jan 2007 21:46:29 +0000 (21:46 +0000)
svn path=/trunk/; revision=25270

reactos/base/applications/downloader/main.c

index d4a8994..21dc1c8 100644 (file)
@@ -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