Returns the tree control's window handle.
Get
| VB.NET | Handle = object.hWnd As Integer |
| VB | Handle = object.hWnd As OLE_HANDLE |
| C#.NET | int Handle = object.hWnd; |
| VC++ | OLE_HANDLE Handle = object->hWnd; OLE_HANDLE Handle = object->GethWnd(); |
| C | HRESULT object->get_hWnd(OLE_HANDLE* Handle); |
object
Handle
Returns the tree control's window handle.
The hWnd property returns the tree control's window handle.
The hWnd property should not be used and may cause incompatibilities with future releases of SftTree/OCX.
m_vTree->CancelMode();
m_ItemMenu.TrackPopupMenu(TPM_LEFTALIGN|TPM_LEFTBUTTON, pt.x, pt.y, this);
}
void CBookTableDlg::OnContextMenuSftTree1(short Button, short Shift, long x, long y)
{
CPoint pt(x, y);
::MapWindowPoints((HWND) m_vTree->hWnd, NULL, &pt, 1);
// Determine click context menu for header or item
long l, t, w, h;
m_vTree->Headers->GetPositionPix(&l, &t, &w, &h);
if (x >= l && x < l + w && y >= t && y <= t + h) {
HeaderMenu(pt);
return;See Also SftTree Object | Object Hierarchy