[comp.windows.ms] Dialog font question.

wilcox@wucs1.wustl.edu (Don Wilcox) (10/16/90)

Hi.

I am having a problem for which no solution seems forthcoming.  I have created
a dialog (using the dialog tool) for which I have set the font to "Tms Rmn" 10.
In the dialog editor, the box is resized and the font is changed, but when I
display the dialog in my app, everything's in the system font.  I have tried
this in both modal and modeless dialogs, with no success.  Can someone tell me
how to get the font changed, and do I have to do it differently for modal vs
modeless dialogs?  Also, if this is in the manuals, could you explain to me how
to figure it out?  I've had little luck.

Thanks in advance,

Don
.sig files are too expensive for a grad student's budget.

sig files are too expensive for a grad student's budget.

kensy@microsoft.UUCP (Ken SYKES) (10/18/90)

In article <1990Oct15.181205.6524@cec1.wustl.edu> wilcox@wucs1.wustl.edu (Don Wilcox) writes:
>Hi.
>
>I am having a problem for which no solution seems forthcoming.  I have created
>a dialog (using the dialog tool) for which I have set the font to "Tms Rmn" 10.
>In the dialog editor, the box is resized and the font is changed, but when I
>display the dialog in my app, everything's in the system font.  I have tried

There is a FONT operator that can be put in the dialog template that does
what you want.  Unfortunately the dialog editor doesn't write this operator

out.  Here is an example of how it is used:

SAMPLE  DIALOG LOADONCALL MOVEABLE DISCARDABLE 26, 19, 162, 90
FONT 8 "Helv"
CAPTION "A dialog"
STYLE WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_POPUP | DS_MODALFRAME
BEGIN

Another game to play is to figure out what point size to select in the 
dialog editor that will prevent the contents from moving when it is used
in the app (hint: in the above case it wouldn't be 8pt Helv, it would be
more like 10 or 12)

Hope this helps.

Ken Sykes
Disclaimer: The above opinions are solely my own.