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 » CExtGridWnd font Collapse All
Subject Author Date
Rado Manzela Mar 26, 2007 - 3:16 AM

I need to change font for whole grid. (and adapt the row height to new font height).
I’ve tried to override HFONT OnGridCellQueryFont(...) in my class derived from CExtTreeGridWnd but it is never called.
What can be the problem?
What is the easiest way for changing the font of tre grid?
Thank you

Rado Manzela Mar 26, 2007 - 10:54 AM

Thank you, this was the problem :)

Suhai Gyorgy Mar 26, 2007 - 7:30 AM

There might be a better way to change the font for the whole grid, but I think I know why OnGridCellQueryFont is never called in your code. You probably used the Help to get the format of this method, but it must have changed in one of the last versions, because it looks like this in Prof-UIS source-code:

	virtual HFONT OnGridCellQueryFont(
		const CExtGridCell & _cell,
		LONG nColNo,
		LONG nRowNo,
		INT nColType,
		INT nRowType,
		DWORD dwAreaFlags,
		bool & bFontMustBeDestroyed,
		DWORD dwHelperPaintFlags = 0
		) const;
There’s an additional parameter, bFontMustBeDestroyed added, compared to what is listed in Help.