WYSIWYG mode

We recommend not to use the WYSIWYG mode (CGXGridParam::SetDrawWYSIWYG (TRUE)), especially when you are developing for Win95.

Following problems are known with WYSIWYG mode:

  • CGXDateTimeCtrl asserts when the user starts  editing the cell while using WYSIWYG mode

  • In WYSIWYG mode, the text is broken at exactly the same position as when printed, but the fonts on the display are not be displayed exactly proportional to the printed fonts and therefore text will sometimes draw over the cell. This is by design and can't be changed.

  • Under Win95, when changing column widths or row heights the display does get messed up. You have to minimize and restore the grid view so that the display is correct again.

Use WYSIWYG mode only temporarily. That means if you require that text is broken correctly when you print the grid temporarily enable WYSIWYG mode then resize the rows or column and then reset the WYSIWYG mode.

Example:

   GetParam()->SetDrawWYSIWYG(TRUE);
   FreeObjectCache();
   UpdateFontMetrics();
   ResizeRowHeightsToFit(range);
   GetParam()->SetDrawWYSIWYG(FALSE);