wilcox@wucs1.wustl.edu (Don Wilcox) (10/19/90)
I asked a variant of this once before, but I didn't get any answers that match the problem, so I thought I would try again. I would like a number of my dialog boxes to be displayed using the Times/Roman font (10 pt.). That is, I want all the controls in this font. I created the dialog boxes using the Dialog Editor, setting the font using the Styles menu. The output description file contains a FONT line, and my dialog routines get a WM_SETFONT message before the initialization message, just as the manuals indicate. However, if I do nothing, my controls show up in the system font, so I tries sending WM_SETFONT messages to all the control windows in response to the init message. My controls still display in the system font. What I want is for my dialog to look like it does in the Dialog Editor, where it is resized (this is the ultimate reason for using the smaller font), and each control is in Times/Roman 10. I cannot seem to find a description in any of the manuals or samples which tells me what I should do, and I cannot find any reference books which describe Windows 3.0. If you can be of assistance, I would be grateful. Deadlines approach... Thank you, thank you, Don sig files are too expensive for a grad student's budget.
fraley@hprnd.rose.hp.com (Andy Fraley) (10/26/90)
To change a control font, such as the font used by a list box, at run-time, try the following: hFont = GetStockObject( SYSTEM_FIXED_FONT ); SendDlgItemMessage( hDlg, ID_LISTBOX, WM_SETFONT, hFont, 0L ); -ASF