Currently viewing: GipsySoft » Front Page» QHTM


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.


The device context used to measure the HTML document.
Zero terminated buffer containing the HTML document to measure
Width, in pixels, of the area that the HTML document will be restricted to.
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.


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