Professional UI Solutions
Site Map   /  Register


Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » print preview mode Collapse All
Subject Author Date
Borremans Pierre Jun 2, 2010 - 12:47 AM

Is it possible to change the header style when we show the print preview for a grid ? For example we want to change the font’s text only on the header

Technical Support Jun 2, 2010 - 7:48 AM

The CExtGridCell::OnPaintBackground(), CExtGridCell::OnPaintForeground() and all the other CExtGridCell::OnPaint*** () are used both for painting grid window surface and enhanced windows metafiles for each printed/previewed paper page. All these methods have the DWORD dwHelperPaintFlags parameter which contains a set of __EGCPF_*** flags. The __EGCPF_PRINTER and __EGCPF_PRINT_PREVIEW flags allow you to know when the painting method is invoked for printing or previewing. If both these flags are absent, then the painting method is invoked for grid window surface. This means you can implement your own grid cells which generate different look on the screen and on the printer sufaces.