ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

treeview.c
Go to the documentation of this file.
00001 /*
00002  * PROJECT:         ReactOS Applications Manager
00003  * LICENSE:         GPL - See COPYING in the top level directory
00004  * FILE:            base/applications/rapps/treeview.c
00005  * PURPOSE:         TreeView functions
00006  * PROGRAMMERS:     Dmitry Chapyshev (dmitry@reactos.org)
00007  */
00008 
00009 #include "rapps.h"
00010 
00011 HWND hTreeView;
00012 
00013 
00014 HTREEITEM
00015 TreeViewAddItem(HTREEITEM hParent, LPWSTR lpText, INT Image, INT SelectedImage, LPARAM lParam)
00016 {
00017     TV_INSERTSTRUCTW Insert;
00018 
00019     ZeroMemory(&Insert, sizeof(TV_INSERTSTRUCT));
00020 
00021     Insert.item.mask = TVIF_TEXT | TVIF_PARAM | TVIF_IMAGE | TVIF_SELECTEDIMAGE;
00022     Insert.hInsertAfter = TVI_LAST;
00023     Insert.hParent = hParent;
00024     Insert.item.iSelectedImage = SelectedImage;
00025     Insert.item.iImage = Image;
00026     Insert.item.lParam = lParam;
00027     Insert.item.pszText = lpText;
00028 
00029     return TreeView_InsertItem(hTreeView, &Insert);
00030 }
00031 
00032 BOOL
00033 CreateTreeView(HWND hwnd)
00034 {
00035     hTreeView = CreateWindowExW(WS_EX_CLIENTEDGE,
00036                                 WC_TREEVIEWW,
00037                                 L"",
00038                                 WS_CHILD | WS_VISIBLE | TVS_HASLINES | TVS_SHOWSELALWAYS,
00039                                 0, 28, 200, 350,
00040                                 hwnd,
00041                                 NULL,
00042                                 hInst,
00043                                 NULL);
00044 
00045     if (!hListView)
00046     {
00047         /* TODO: Show error message */
00048         return FALSE;
00049     }
00050 
00051     SetFocus(hTreeView);
00052 
00053     return TRUE;
00054 }

Generated on Sat May 26 2012 04:16:20 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.