ReactOS 0.4.16-dev-338-g34e76ad
CTreeView Class Reference

#include <rosctrls.h>

Inheritance diagram for CTreeView:
Collaboration diagram for CTreeView:

Public Member Functions

HWND Create (HWND hwndParent)
 
HTREEITEM AddItem (HTREEITEM hParent, LPWSTR lpText, INT Image, INT SelectedImage, LPARAM lParam)
 
void SetRedraw (BOOL redraw)
 
BOOL SetBkColor (COLORREF cr)
 
BOOL SetTextColor (COLORREF cr)
 
HIMAGELIST SetImageList (HIMAGELIST himl, int iImageList)
 
HTREEITEM InsertItem (const TVINSERTSTRUCTW *pitem)
 
BOOL DeleteItem (HTREEITEM i)
 
BOOL GetItem (TV_ITEM *pitem)
 
BOOL SetItem (const TV_ITEM *pitem)
 
int GetItemCount ()
 
BOOL EnsureVisible (HTREEITEM i)
 
HWND EditLabel (HTREEITEM i)
 
HTREEITEM GetNextItem (HTREEITEM i, WORD flags)
 
UINT GetItemState (int i, UINT mask)
 
HTREEITEM HitTest (TVHITTESTINFO *phtInfo)
 
DWORD_PTR GetItemData (HTREEITEM item)
 
HTREEITEM GetSelection ()
 
BOOL Expand (HTREEITEM item, DWORD action)
 
BOOL SelectItem (HTREEITEM item, DWORD action=TVGN_CARET)
 

Detailed Description

Definition at line 479 of file rosctrls.h.

Member Function Documentation

◆ AddItem()

HTREEITEM CTreeView::AddItem ( HTREEITEM  hParent,
LPWSTR  lpText,
INT  Image,
INT  SelectedImage,
LPARAM  lParam 
)
inline

Definition at line 498 of file rosctrls.h.

499 {
500 TVINSERTSTRUCTW Insert;
501
502 ZeroMemory(&Insert, sizeof(TV_INSERTSTRUCT));
503
505 Insert.hInsertAfter = TVI_LAST;
506 Insert.hParent = hParent;
507 Insert.item.iSelectedImage = SelectedImage;
508 Insert.item.iImage = Image;
509 Insert.item.lParam = lParam;
510 Insert.item.pszText = lpText;
511
512 return InsertItem(&Insert);
513 }
HTREEITEM InsertItem(const TVINSERTSTRUCTW *pitem)
Definition: rosctrls.h:535
LPARAM lParam
Definition: combotst.c:139
#define TVI_LAST
Definition: commctrl.h:3375
#define TVIF_TEXT
Definition: commctrl.h:3271
#define TVIF_IMAGE
Definition: commctrl.h:3272
#define TV_INSERTSTRUCT
Definition: commctrl.h:3382
#define TVIF_PARAM
Definition: commctrl.h:3273
#define TVIF_SELECTEDIMAGE
Definition: commctrl.h:3276
HTREEITEM hParent
Definition: commctrl.h:3398
HTREEITEM hInsertAfter
Definition: commctrl.h:3399
#define ZeroMemory
Definition: winbase.h:1737

◆ Create()

HWND CTreeView::Create ( HWND  hwndParent)
inline

Definition at line 483 of file rosctrls.h.

484 {
487 L"",
489 0, 28, 200, 350,
491 NULL,
492 _AtlBaseModule.GetModuleInstance(),
493 NULL);
494
495 return m_hWnd;
496 }
static HWND hwndParent
Definition: cryptui.c:300
#define NULL
Definition: types.h:112
#define L(x)
Definition: ntvdm.h:50
#define WS_CHILD
Definition: pedump.c:617
#define WS_VISIBLE
Definition: pedump.c:620
#define TVS_SHOWSELALWAYS
Definition: commctrl.h:3257
#define TVS_HASLINES
Definition: commctrl.h:3253
#define WC_TREEVIEWW
Definition: commctrl.h:3248
HWND WINAPI CreateWindowExW(_In_ DWORD dwExStyle, _In_opt_ LPCWSTR lpClassName, _In_opt_ LPCWSTR lpWindowName, _In_ DWORD dwStyle, _In_ int X, _In_ int Y, _In_ int nWidth, _In_ int nHeight, _In_opt_ HWND hWndParent, _In_opt_ HMENU hMenu, _In_opt_ HINSTANCE hInstance, _In_opt_ LPVOID lpParam)
#define WS_EX_CLIENTEDGE
Definition: winuser.h:384

Referenced by CMainWindow::CreateTreeView().

◆ DeleteItem()

BOOL CTreeView::DeleteItem ( HTREEITEM  i)
inline

Definition at line 540 of file rosctrls.h.

541 {
542 return (BOOL) SendMessage(TVM_DELETEITEM, 0, (LPARAM)i);
543 }
unsigned int BOOL
Definition: ntddk_ex.h:94
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define TVM_DELETEITEM
Definition: commctrl.h:3419
LONG_PTR LPARAM
Definition: windef.h:208
#define SendMessage
Definition: winuser.h:5855

◆ EditLabel()

HWND CTreeView::EditLabel ( HTREEITEM  i)
inline

Definition at line 565 of file rosctrls.h.

566 {
567 return (HWND) SendMessage(TVM_EDITLABEL, 0, (LPARAM)i);
568 }
#define TVM_EDITLABEL
Definition: commctrl.h:3507

◆ EnsureVisible()

BOOL CTreeView::EnsureVisible ( HTREEITEM  i)
inline

Definition at line 560 of file rosctrls.h.

561 {
563 }
#define TVM_ENSUREVISIBLE
Definition: commctrl.h:3549

◆ Expand()

BOOL CTreeView::Expand ( HTREEITEM  item,
DWORD  action 
)
inline

Definition at line 599 of file rosctrls.h.

600 {
602 }
const WCHAR * action
Definition: action.c:7509
static ATOM item
Definition: dde.c:856
#define TVM_EXPAND
Definition: commctrl.h:3424

Referenced by CMainWindow::InitCategoriesList().

◆ GetItem()

BOOL CTreeView::GetItem ( TV_ITEM pitem)
inline

Definition at line 545 of file rosctrls.h.

546 {
547 return (BOOL) SendMessage(TVM_GETITEM, 0, reinterpret_cast<LPARAM>(pitem));
548 }
#define TVM_GETITEM
Definition: commctrl.h:3493

Referenced by GetItemData().

◆ GetItemCount()

int CTreeView::GetItemCount ( )
inline

Definition at line 555 of file rosctrls.h.

556 {
558 }
#define TVM_GETCOUNT
Definition: commctrl.h:3436

◆ GetItemData()

DWORD_PTR CTreeView::GetItemData ( HTREEITEM  item)
inline

Definition at line 585 of file rosctrls.h.

586 {
587 TVITEMW lvItem;
588 lvItem.hItem = item;
589 lvItem.mask = TVIF_PARAM;
590 BOOL ret = GetItem(&lvItem);
591 return (DWORD_PTR) (ret ? lvItem.lParam : NULL);
592 }
BOOL GetItem(TV_ITEM *pitem)
Definition: rosctrls.h:545
HTREEITEM hItem
Definition: commctrl.h:3322
LPARAM lParam
Definition: commctrl.h:3330
UINT mask
Definition: commctrl.h:3321
uint32_t DWORD_PTR
Definition: typedefs.h:65
int ret

◆ GetItemState()

UINT CTreeView::GetItemState ( int  i,
UINT  mask 
)
inline

Definition at line 575 of file rosctrls.h.

576 {
578 }
GLenum GLint GLuint mask
Definition: glext.h:6028
#define TVM_GETITEMSTATE
Definition: treelist.h:336

◆ GetNextItem()

HTREEITEM CTreeView::GetNextItem ( HTREEITEM  i,
WORD  flags 
)
inline

Definition at line 570 of file rosctrls.h.

571 {
573 }
GLbitfield flags
Definition: glext.h:7161
#define TVM_GETNEXTITEM
Definition: commctrl.h:3454

Referenced by GetSelection().

◆ GetSelection()

HTREEITEM CTreeView::GetSelection ( )
inline

Definition at line 594 of file rosctrls.h.

595 {
596 return GetNextItem(NULL, TVGN_CARET);
597 }
HTREEITEM GetNextItem(HTREEITEM i, WORD flags)
Definition: rosctrls.h:570
#define TVGN_CARET
Definition: commctrl.h:3466

◆ HitTest()

HTREEITEM CTreeView::HitTest ( TVHITTESTINFO phtInfo)
inline

Definition at line 580 of file rosctrls.h.

581 {
582 return (HTREEITEM) SendMessage(TVM_HITTEST, 0, reinterpret_cast<LPARAM>(phtInfo));
583 }
#define TVM_HITTEST
Definition: commctrl.h:3517

◆ InsertItem()

HTREEITEM CTreeView::InsertItem ( const TVINSERTSTRUCTW pitem)
inline

Definition at line 535 of file rosctrls.h.

536 {
537 return (HTREEITEM) SendMessage(TVM_INSERTITEM, 0, reinterpret_cast<LPARAM>(pitem));
538 }
#define TVM_INSERTITEM
Definition: commctrl.h:3415

Referenced by AddItem().

◆ SelectItem()

BOOL CTreeView::SelectItem ( HTREEITEM  item,
DWORD  action = TVGN_CARET 
)
inline

Definition at line 604 of file rosctrls.h.

605 {
607 }
#define TVM_SELECTITEM
Definition: commctrl.h:3483

Referenced by CMainWindow::InitCategoriesList(), and CMainWindow::OnCommand().

◆ SetBkColor()

BOOL CTreeView::SetBkColor ( COLORREF  cr)
inline

Definition at line 520 of file rosctrls.h.

521 {
522 return (BOOL) SendMessage(TVM_SETBKCOLOR, 0, cr);
523 }
#define TVM_SETBKCOLOR
Definition: commctrl.h:3580

◆ SetImageList()

HIMAGELIST CTreeView::SetImageList ( HIMAGELIST  himl,
int  iImageList 
)
inline

Definition at line 530 of file rosctrls.h.

531 {
532 return (HIMAGELIST) SendMessage(TVM_SETIMAGELIST, iImageList, reinterpret_cast<LPARAM>(himl));
533 }
HIMAGELIST himl
#define TVM_SETIMAGELIST
Definition: commctrl.h:3451

◆ SetItem()

BOOL CTreeView::SetItem ( const TV_ITEM pitem)
inline

Definition at line 550 of file rosctrls.h.

551 {
552 return (BOOL) SendMessage(TVM_SETITEM, 0, reinterpret_cast<LPARAM>(pitem));
553 }
#define TVM_SETITEM
Definition: commctrl.h:3500

◆ SetRedraw()

void CTreeView::SetRedraw ( BOOL  redraw)
inline

Definition at line 515 of file rosctrls.h.

516 {
518 }
void redraw(int x, int y, int cx, int cy)
Definition: qtewin.cpp:1248
#define WM_SETREDRAW
Definition: winuser.h:1619

◆ SetTextColor()

BOOL CTreeView::SetTextColor ( COLORREF  cr)
inline

Definition at line 525 of file rosctrls.h.

526 {
527 return (BOOL) SendMessage(TVM_SETTEXTCOLOR, 0, cr);
528 }
#define TVM_SETTEXTCOLOR
Definition: commctrl.h:3582

The documentation for this class was generated from the following file: