SftTree/DLL 6.5

AdjustCellEditRect

Softel vdm, Inc.

Returns a cell's location in client area coordinates of the left or right pane of a split tree control.

C

BOOL WINAPI SftTree_AdjustCellEditRect(HWND hwndCtl,
        int index,
        int realCol,
        LPRECT lpRect);
BOOL WINAPI SftTreeSplit_AdjustCellEditRect(HWND hwndCtl,
        int index,
        int realCol,
        LPRECT lpRect);

C++

BOOL CSftTree::AdjustCellEditRect(int index,
        int realCol,
        LPRECT lpRect) const;
BOOL CSftTreeSplit::AdjustCellEditRect(int index,
        int realCol,
        LPRECT lpRect) const;

Parameters

hwndCtl

The window handle of the tree control.

index

The zero-based index of the cell for which the position is to be adjusted.

realCol

The zero-based column number of the cell for which the position is to be adjusted.

lpRect

The coordinates of the cell relative to the client area of the tree control, usually retrieved using GetDisplayCellRect.  On return, these coordinates are adjusted to be relative to the client area of the left or right pane of a split tree control.  In a tree control without splitter bar, this function has no effect.

Returns

The return value is TRUE if the function was successful, otherwise FALSE.

Comments

The AdjustCellEditRect function returns a cell's location in client area coordinates of the left or right pane of a split tree control.

This function is used for cell editing.  Controls such as edit controls or combo boxes, which are created by the application for cell editing, are created with the tree control as the parent window.  When a split tree control is used, the control must be attached to the left or right pane, not the tree control.  AdjustCellEditRect is used to calculate the coordinates for the control relative to the left or right pane, one of which is the parent window of the control.

GetCellEditWindow is used to retrieve the window handle of the pane, which will be the parent of the control used for cell editing.

AdjustCellEditRect has no effect in a tree control without splitter bar.  But it is recommended to use AdjustCellEditRect in case the application is later converted to use a split tree control.

See Also  C/C++ API  |  CategoriesNotifications

 


Feedback / comments / error reports for this topic
© 2009 - Softel vdm, Inc. - www.softelvdm.com