MTblGetColHdrRectEx
nRet = MTblGetColHdrRectEx( hWndCol, nLeft, nTop, nRight, nBottom, nFlags )
Retrieves the rectangle of a column header in pixels, relative to the upper left corner of the table.
Parameters
hWndCol
Window Handle: Handle of the column
nLeft
Receive Number: X-coordinate of the upper-left corner of the rectangle
nTop
Receive Number: Y-coordinate of the upper-left corner of the rectangle
nRight
Receive Number: X-coordinate of the lower-right corner of the rectangle
nBottom
Receive Number: Y-coordinate of the lower-right corner of the rectangle
nFlags
Number: Any combination of the following constants:
MTGR_VISIBLE_PART |
Retrieves only the visible part of the column header |
MTGR_EXCLUDE_COLHDRGRP |
If the column header is part of a group, the group part of the column header is excluded from the rectangle. See also: Column header groups. |
Return
Number: One of the following constants:
MTGR_RET_ERROR |
An error has occures |
MTGR_RET_INVISIBLE |
No part of the column header is visible |
MTGR_RET_PARTLY_VISIBLE |
Only a part of the column header is visible |
MTGR_RET_VISIBLE |
The column header is visible |
Example
In this example a data field is shown in the visible part of a column header the user clicked:
On MTM_ColHdrLBtnDown
Set hWndCol = SalNumberToWindowHandle( wParam )
If hWndCol
If MTblGetColHdrRectEx( hWndCol, nLeft, nTop, nRight, nBottom, MTGR_VISIBLE_PART ) != MTGR_RET_ERROR
Call SetParent( hWndDataField, hWndForm )
Call SetWindowPos( hWndDataField, hWndNULL, nLeft, nTop, nRight - nLeft, nBottom - nTop, SWP_SHOWWINDOW )
See also
Size, location and hit test
Created with the Personal Edition of HelpNDoc: Free Kindle producer