Announcement

Collapse
No announcement yet.

Deleteallitems for treeview

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Michael Mattias
    replied
    COMMCTRL.INC 27 Oct 2003 (what shipped with PB/WIN 9.0)
    Code:
    %TVI_ROOT               = &HFFFF0000???
    %TVI_FIRST              = &HFFFF0001???
    %TVI_LAST               = &HFFFF0002???
    %TVI_SORT               = &HFFFF0003???
    commctrl.h
    Code:
                                                                               *
    * commctrl.h - - Interface for the Windows Common Controls                    *
    *                                                                             *
    * Version 1.2                                                                 *
    *                                                                             *
    * Copyright (c) 1991-1998, Microsoft Corp.      All rights reserved.          *
    *                                                                             *
    
    
    #define TVI_ROOT                ((HTREEITEM)(ULONG_PTR)-0x10000)
    #define TVI_FIRST               ((HTREEITEM)(ULONG_PTR)-0x0FFFF)
    #define TVI_LAST                ((HTREEITEM)(ULONG_PTR)-0x0FFFE)
    #define TVI_SORT                ((HTREEITEM)(ULONG_PTR)-0x0FFFD)

    Leave a comment:


  • Edwin Knoppert
    replied
    That's a pretty hard thing to do.
    No i write custom controls and on delete all i need to handle the objects stored in each item.
    From now on i keep using TVI_ROOT as it should.

    Leave a comment:


  • Chris Holbrook
    replied
    Originally posted by Edwin Knoppert View Post
    Would like to end this doubt.
    Wish I could help, but having tangled with this one before I now destroy the TV window and recreate it, which I assume allows windows to clean up its own mess. Do I assume too much?

    Leave a comment:


  • Edwin Knoppert
    started a topic Deleteallitems for treeview

    Deleteallitems for treeview

    TVM_DELETEITEM

    In the helpfile it's cleary stated i should use TVI_ROOT as param but long time ago i had a GPF on this and i always used 0 and seems to work well.
    To do the right thing.. is TVI_ROOT a valid option or are there reasons to keep using 0?

    Maybe this be related to Windows 98 or an older PB compiler possibly having TVI_ROOT not declared being a DWORD constant or so?
    Would like to end this doubt.

Working...
X