Hide

SftTree/DLL 7.5 - Tree Control

Display
Print

MakeContentWindow

Defines the specified window as a content window (virtual mode only).

C

void WINAPI SftTree_MakeContentWindow(HWND hwndCtl, HWND hwndCell, BOOL fSet);
void WINAPI SftTreeSplit_MakeContentWindow(HWND hwndCtl, HWND hwndCell, BOOL fLeft, BOOL fSet);

C++

void CSftTree::MakeContentWindow(HWND hwndCell, BOOL fSet)
void CSftTreeSplit::MakeContentWindow(HWND hwndCell, BOOL fLeft, BOOL fSet)

Parameters

hwndCtl

The window handle of the tree control.

hwndCell

The window handle of the content window.

fLeft

Set to TRUE if the content window is located in the left pane of a split tree control, FALSE otherwise and the content window is located in the right pane.

fSet

Set to TRUE if the window handle described by hwndCell is a content window, FALSE otherwise. FALSE is used to remove a previously defined context window. Calling MakeContentWindow with fSet=FALSE is usually not necessary if the context window is simply destroyed.

Comments

The MakeContentWindow function defines a window as a content window for use with a tree control using a virtual data source. If the tree control doesn't use virtual mode, any calls to MakeContentWindow are ignored.

The call to MakeContentWindow must occur after the total number of items has been defined (using VirtualCount) and the tree control is otherwise completely initialized.

MakeContentWindow marks the window handle as a content window. The virtual data source callback (LPFNSFTTREE_VGETITEM) can then provide the content window in the hwndCell field of the SFTTREE_CELL structure, embedded within the aCells field of the SFTTREE_ITEM structure.

Calling MakeContentWindow with fSet=FALSE is usually not necessary if the context window is simply destroyed. If the content window is to be preserved for later reuse, a call to MakeContentWindow with fSet=FALSE is required. In addition, the content window must be removed from the tree control and added to another window as a child window using the Windows API SetParent.

See Also C/C++ API | Categories | Notifications