mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 20:53:02 +00:00
Create a branch for cmake bringup.
svn path=/branches/cmake-bringup/; revision=48236
This commit is contained in:
parent
a28e798006
commit
c424146e2c
20602 changed files with 0 additions and 1140137 deletions
54
base/applications/rapps/treeview.c
Normal file
54
base/applications/rapps/treeview.c
Normal file
|
@ -0,0 +1,54 @@
|
|||
/*
|
||||
* PROJECT: ReactOS Applications Manager
|
||||
* LICENSE: GPL - See COPYING in the top level directory
|
||||
* FILE: base/applications/rapps/treeview.c
|
||||
* PURPOSE: TreeView functions
|
||||
* PROGRAMMERS: Dmitry Chapyshev (dmitry@reactos.org)
|
||||
*/
|
||||
|
||||
#include "rapps.h"
|
||||
|
||||
HWND hTreeView;
|
||||
|
||||
|
||||
HTREEITEM
|
||||
TreeViewAddItem(HTREEITEM hParent, LPWSTR lpText, INT Image, INT SelectedImage, LPARAM lParam)
|
||||
{
|
||||
TV_INSERTSTRUCTW Insert;
|
||||
|
||||
ZeroMemory(&Insert, sizeof(TV_INSERTSTRUCT));
|
||||
|
||||
Insert.item.mask = TVIF_TEXT | TVIF_PARAM | TVIF_IMAGE | TVIF_SELECTEDIMAGE;
|
||||
Insert.hInsertAfter = TVI_LAST;
|
||||
Insert.hParent = hParent;
|
||||
Insert.item.iSelectedImage = SelectedImage;
|
||||
Insert.item.iImage = Image;
|
||||
Insert.item.lParam = lParam;
|
||||
Insert.item.pszText = lpText;
|
||||
|
||||
return TreeView_InsertItem(hTreeView, &Insert);
|
||||
}
|
||||
|
||||
BOOL
|
||||
CreateTreeView(HWND hwnd)
|
||||
{
|
||||
hTreeView = CreateWindowExW(WS_EX_CLIENTEDGE,
|
||||
WC_TREEVIEWW,
|
||||
L"",
|
||||
WS_CHILD | WS_VISIBLE | TVS_HASLINES | TVS_SHOWSELALWAYS,
|
||||
0, 28, 200, 350,
|
||||
hwnd,
|
||||
NULL,
|
||||
hInst,
|
||||
NULL);
|
||||
|
||||
if (!hListView)
|
||||
{
|
||||
/* TODO: Show error message */
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
SetFocus(hTreeView);
|
||||
|
||||
return TRUE;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue