Is there a simple way to adjust the font size used in drawing text in a form when that form is resized?
I am thinking of "rolling my own" predicate(s) to set the font size in proportion to the Form size when that Form is repainted in the onPaint event handler.
Code: Select all
CurrFont = vpi::winGetFont( W ),
% get form height and width,
% calculate new font size required based on "M" size and
% Create NewFont
vpi::winSetFont( W, NewFont ),
vpi::drawTextInRect( W, RCT, String, Flags ),
vpi::winSetFont( W, CurrFont ),
...