<< Return to Main Index

< Return to Class Index

Class CGXHtmlW

Remarks

This class adds HTML output support for Objective Grid. Application can choose to write a rectangular portion of the grid into HTML table. If no selection range is passed in, the write procedure output the whole grid into a HTML table. If you passed in a selection range in the grid, then only the selected portion of the grid will be output to the HTML table. When output the grid into HTML table, application can change the output format by writing custom tag handler. By default, all the HTML table related tags is handled by the CGXTagDefaultHandler class. To use custom tag handler, you just need to add proper tag entry into the tag map table specifying the name of the tag handler class. To use the default implementation of this class to output the grid into an HTML table is extremely easy.

Example:
CMyGridView::OnWriteToHTML()
{
   CFileDialog dlg(TRUE, NULL, NULL,
                  OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
                  _T("HTML Files(.htm, *.html)|*.htm;*.html|
                  All Files(*.*)|*.*||"));

   if( dlg.DoModal() != IDOK )
         return;
   CGXHtmlW html(this);
   html.WriteToFile(dlg.GetFileName());
}

CGXHtmlW

Class Members