Currently viewing: GipsySoft » Front Page» QHTM

QHTM_OPT_SET_RESOURCE_CALLBACK

Set (not get) the function used by QHTM to retrieve bitmaps.

Parameters

wParam
Must be QHTM_OPT_SET_BITMAP_CALLBACK.
lParam
Function pointer of type funcQHTMResourceCallback

Return value


None

Remarks

QHTM calls GlobalFree() on the returned HGLOBAL after it has extracted the resource from the memory block.

Example

HGLOBAL MyQHTMResourceCallback( LPCTSTR pcszResourceName )
{
	//
	//	Only pass HTML page requests back.
	if( strstr( pcszResourceName, "html" ) )
	{
		static TCHAR sz[] = _T("Hello, I am a <b>demo</b>");
		LPTSTR p = (LPTSTR)( GlobalAlloc( GPTR, sizeof( sz ) ) );
		_tcscpy( p, sz );

		return (HGLOBAL)p;
	}
	return NULL;
}


QHTM_SetResourceCallback( hwndQHTM, MyQHTMResourceCallback );

See also funcQHTMResourceCallback