QHTM_PrintGetHTMLHeight
int WINAPI QHTM_PrintGetHTMLHeight( HDC hdc, LPCTSTR pcszText, int nMaxWidth, UINT uZoomLevel );
Given a fixed width it returns the rendered height of the HTML.
Used to determine how much HTML will fit on a single page or within a particular bounding width.
Parameters
- hdc
- The device context used to measure the HTML document.
- pcszText
- Zero terminated buffer containing the HTML document to measure
- nMaxWidth
- Width, in pixels, of the area that the HTML document will be restricted to.
- uZoomLevel
- The zoom level to print at. Can be between 0 and 4. There is a constant for the default zoom level used by QHTM:
QHTM_ZOOM_DEFAULT
Return value
The height of the HTML given a width.Example
const int nHeight = QHTM_PrintGetHTMLHeight( hdcPrint, pcszHTMLText, nPrintWidth, QHTM_ZOOM_DEFAULT );
//
// We now know how tall the HTML will be given a display/print width.
See also None