hi all,

is some time i would like to know some little things about .rc files...
I've searched in many examples, but i can't find anything...

1) In all the examples, as initial dialog definition, i find:



IDD_RDMSG DIALOGEX MOVEABLE LOADONCALL DISCARDABLE 0, 0, 400, 250
STYLE DS_3DLOOK | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "X_sister - [see message]"
FONT 8, "Tahoma"


How can i have the font as BOLD ?

2) Can i draw a small icon (same size as in the window caption bar) inside the dialog ?
3) Can i change the font of only one control of the dialog, for example of an edit control ?

Thanks !!!! B7
Posted on 2002-07-26 07:04:42 by Bit7
Bit7,

you can use :-

FONT 8, "Tahoma",<weight>,<italic>

where weight is the weight of the font, 800 should be bold.

I think the italic goes in as a 1 or zero.

As for changing just one control, use a WM_SETFONT message in yout WM_INITDIALOG, to change the font of the dialog when it loads. I don't think there is a way to do it in the .rc file, but anyone please feel free to contradict me.


umbongo
Posted on 2002-07-26 07:10:57 by umbongo

2) Can i draw a small icon (same size as in the window caption bar) inside the dialog ?


if you mean to display the icon somewhere in your dialog, then this should work:


500 ICON "bla.ico"
]
in the dialog create a static control like this:



Mydialog DIALOG DISCARDABLE 122, 112, 276, 130
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Blaha"
FONT 8, "MS Sans Serif"
BEGIN
CONTROL 500,IDC_STATIC,"Static",SS_ICON,5,6,267,62 //where 500 is the icon resource id
END


hope that helps..
Posted on 2002-07-26 08:47:43 by NOP-erator
You may find the helpfile from my resource compiler GoRC helpful

See www.GoDevTool.com
Posted on 2002-07-26 13:27:50 by jorgon
thanks all !!!!
Posted on 2002-07-29 14:04:32 by Bit7