Author: mbosma Date: Tue Jan 2 00:46:29 2007 New Revision: 25270
URL: http://svn.reactos.org/svn/reactos?rev=25270&view=rev Log: Set explicitly set default icon when adding item to the applications tree view. Workaround for reactos bug.
Modified: trunk/reactos/base/applications/downloader/main.c
Modified: trunk/reactos/base/applications/downloader/main.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/downloade... ============================================================================== --- trunk/reactos/base/applications/downloader/main.c (original) +++ trunk/reactos/base/applications/downloader/main.c Tue Jan 2 00:46:29 2007 @@ -79,9 +79,10 @@ (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 @@ 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