Messages of treeview control
[TreeView control]

Defines


Define Documentation

#define TVM_ADDITEM   0xF110

Adds a new item in a treeview control.

 TVM_ADDITEM
 GHANDLE parent;
 PTVITEMINFO newIteminfo;

 wParam = (WPARAM)parent;
 lParam = (LPARAM)newIteminfo;
Parameters:
parent Handle to the item who is the parent of the new item.
newIteminfo Pointer to the item info structure of the new item to be added.
Returns:
The handle to the new item on success, otherwise return 0.

Definition at line 169 of file treeview.h.

#define TVM_DELTREE   0xF113

Removes an item and its descendant items for the treeview control.

 TVM_DELTREE
 GHANDLE item;

 wParam = (WPARAM)item;
 lParam = 0;
Returns:
Zero on success, otherwise -1.

Definition at line 206 of file treeview.h.

#define TVM_FINDCHILD   0xF115

Finds a child item matching a specified string in children of a specific item.

 TVM_FINDCHILD
 GHNADLE item;
 char* string;

 wParam = (WPARAM)item;
 lParam = (LPARAM)string;
Parameters:
item The handle to the item. Zero means the root item.
string The specified string.
Returns:
The handle to the item whose text matches the specified string on success, otherwise zero for not found or invalid parameters.

Definition at line 251 of file treeview.h.

#define TVM_GETITEMINFO   0xF11A

Retrives the information of an item in TreeView control.

 TVM_GETITEMINFO

 GHANDLE item;
 TVITEMINFO* tvii;

 wParam = (WPARAM)item;
 lParam = (LPARAM)tvii;
Parameters:
item The handle to the item which we want to retrive.
tvii A pointer to a TVITEMINFO structure to receive the item information. Note that the text field of this structure should be large enough to get the item text.
Returns:
Zero on success, otherwise -1.
See also:
TVM_GETITEMTEXTLEN

Definition at line 349 of file treeview.h.

#define TVM_GETITEMTEXT   0xF119

Retrives the text of the specified item in TreeView control.

 TVM_GETITEMTEXT

 GHANDLE item;
 char* buffer;

 wParam = (WPARAM)item;
 lParam = (LPARAM)buffer;
Parameters:
item The handle to the item which we want to retrive.
buffer The pointer to a buffer to save the text of the item.
Returns:
The length of the item text on success, otherwise -1.

Definition at line 324 of file treeview.h.

#define TVM_GETITEMTEXTLEN   0xF118

Retrives the text length of the specified item in TreeView control.

 TVM_GETITEMTEXTLEN

 GHANDLE item;

 wParam = (WPARAM)item;
 lParam = (LPARAM)0;
Parameters:
item The handle to the item which we want to retrive.
Returns:
The length of the item text on success, otherwise -1.

Definition at line 303 of file treeview.h.

#define TVM_GETRELATEDITEM   0xF11C

Retrives related item of specific item.

 TVM_GETRELATEDITEM
 int related;
 GHANDLE item;

 wParam = (WPARAM)related;
 lParam = (LPARAM)item;
Parameters:
related A integer which indicates the relationship between the item to retrive and the specified item, can be one of the following values:

  • TVIR_PARENT
    To retrive the parent item of the specified item.
  • TVIR_FIRSTCHILD
    To retrive the first child item of the specified item.
  • TVIR_NEXTSIBLING
    To retrive the next sibling item of the specified item.
  • TVIR_PREVSIBLING
    To retrive the previous sibling item of the specified item.
item The handle to the known item.
Returns:
The handle to the related item on success, otherwise 0.

Definition at line 405 of file treeview.h.

#define TVM_GETROOT   0xF112

Gets the root item of a treeview control.

 TVM_GETROOT

 wParam = 0;
 lParam = 0;
Returns:
The handle to the root item.

Definition at line 190 of file treeview.h.

#define TVM_GETSELITEM   0xF116

Gets the selected item.

 TVM_GETSELITEM

 wParam = 0;
 lParam = 0;
Returns:
Handle to the selected item.

Definition at line 266 of file treeview.h.

#define TVM_INSERTITEM   0xF111

The same as TVM_ADDITEM message.

Definition at line 175 of file treeview.h.

#define TVM_SEARCHITEM   0xF114

Searches an item matching a specified string in a subtree rooted by a specific item.

Note:
This is a depth first search.
 TVM_SEARCHITEM
 GHNADLE item;
 char* string;

 wParam = (WPARAM)item;
 lParam = (LPARAM)string;
Parameters:
found The handle to the item which is the root item of the subtree. Zero means the root item.
string The specified string.
Returns:
The handle to the item whose text matches the specified string on success, otherwise zero for not found or invalid parameters.

Definition at line 230 of file treeview.h.

#define TVM_SETITEMINFO   0xF11B

Changes the information of an item.

 TVM_SETITEMTEXT
 GHANDLE item;
 TVITEMINFO* tvii;

 wParam = (WPARAM)id;
 lParam = (LPARAM)tvii;
Parameters:
item The handle of the item.
newText Pointer to a TVITEMINFO structure which include the new information of the item.
Returns:
Zero on success, otherwise -1.

Definition at line 370 of file treeview.h.

#define TVM_SETSELITEM   0xF117

Sets the selected item.

 TVM_SETSELITEM
 GHANDLE item;

 wParam = (WPARAM)item;
 lParam = 0;
Parameters:
item The handle to candicate item.
Returns:
The handle to the old selected item on success, otherwise -1.

Definition at line 284 of file treeview.h.

#define TVM_SETSTRCMPFUNC   0xF11D

Sets the STRCMP function used to sort items.

An application sends a TVM_SETSTRCMPFUNC message to set a new STRCMP function to sort items in the TreeView control.

Note that you should send this message before adding any item to the TreeView control.

 static int my_strcmp (const char* s1, const char* s2, size_t n)
 {
      ...
      return 0;
 }

 TVM_SETSTRCMPFUNC

 wParam = 0;
 lParam = (LPARAM) my_strcmp;
Parameters:
my_strcmp Your own function to compare two strings.
Returns:
One of the following values:
  • 0
    Success
  • -1
    Not an empty TreeView control

Definition at line 436 of file treeview.h.

Generated on Thu Apr 7 15:58:37 2011 for MiniGUI V3.0.12 API Reference by  doxygen 1.6.3