Professional UI Solutions
Site Map   /  Register
 
 

Forum

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 Tech Support » Question abou OnQueryCellFont Collapse All
Subject Author Date
Thomas Aust Jan 18, 2006 - 8:05 AM

Hi,

i derived a class from CExtGridCellStringDM (used in a CExtTreeGridWnd) and implement the virtual method OnQueryCellFont like this:

class CHeaderCell : public CExtGCC<CExtGridCellStringDM><CEXTGRIDCELLSTRINGDM>
{
public:
 DECLARE_DYNCREATE(CHeaderCell);
 IMPLEMENT_ExtGridCell_Clone(CHeaderCell, CExtGridCellStringDM);
 
 CHeaderCell(CExtGridDataProvider * pDP=NULL);
 virtual HFONT OnQueryCellFont(const CExtGridWnd & wndGrid,
          LONG nVisibleColNo,
          LONG nVisibleRowNo,
          LONG nColNo,
          LONG nRowNo,
          INT nColType,
          INT nRowType,
          DWORD dwAreaFlags) const
 {
  return (HFONT)g_PaintManager->m_FontBold;
 }
};


but the function is never called. What’s wrong ?


 


Thanks for your help, Thomas


 


 

Technical Support Jan 18, 2006 - 9:15 AM

The declaration of OnQueryCellFont() looks like as follows:

 virtual HFONT OnQueryCellFont(
  const CExtGridWnd & wndGrid,
  LONG nVisibleColNo,
  LONG nVisibleRowNo,
  LONG nColNo,
  LONG nRowNo,
  INT nColType,
  INT nRowType,
  DWORD dwAreaFlags,
  DWORD dwHelperPaintFlags = 0
  ) const;
You missed the last parameter dwHelperPaintFlags.