The MASM Forum

Projects => Rarely Used Projects => RadAsm IDE Support => Topic started by: bluedevil on September 22, 2018, 04:27:09 PM

Title: Adding Dialog "FONT 8,"MS Sans Serif",400,0"
Post by: bluedevil on September 22, 2018, 04:27:09 PM
Hello
When i add a new dialog to my source, in the background RadASM2 creates a projectNameDlg.rc file in RES directory. And adds this line:
FONT 8,"MS Sans Serif",400,0

But when i compile with "400", the dialog opens "extra large"

however the line should be like this:
FONT 8,"MS Sans Serif",0,0

Does this also happen to you?
Or i am missing some kind of setting?

I want that line initialized with ",0,0" when i create a dialog?
Title: Re: Adding Dialog "FONT 8,"MS Sans Serif",400,0"
Post by: fearless on September 23, 2018, 01:21:03 AM
Think its a default output, for weight:

https://docs.microsoft.com/en-us/windows/desktop/menurc/font-statement
I would guess if its showing a bigger font, then maybe some scaling is happening going from logical point size to dialog units with scaled size, depending on your monitor resolution and windows version - just a guess though.
Title: Re: Adding Dialog "FONT 8,"MS Sans Serif",400,0"
Post by: bluedevil on September 23, 2018, 01:42:24 AM
@fearless thank you for your answer.

i have checked your code; for example this:
Quotehttps://github.com/mrfearless/RadASM2/blob/master/Res/DlgOptionDlg.Rc

you left the font properties ",0,0"

The thing that i want to ask is, " did your RadASM also put "400,0" to your code and you manually fixed to ",0,0" OR by default it is ",0,0" ?"

Thanks :)
Title: Re: Adding Dialog "FONT 8,"MS Sans Serif",400,0"
Post by: BugCatcher on September 23, 2018, 02:30:58 AM
I got this.. No Zero's

#define IDD_DIALOG 1000
IDD_DIALOG DIALOGEX 6,6,194,106
CAPTION "Dialog As Main"
FONT 8,"MS Sans Serif"
CLASS "DLGCLASS"
STYLE 0x10CF0800
EXSTYLE 0x00000000
BEGIN
END
Title: Re: Adding Dialog "FONT 8,"MS Sans Serif",400,0"
Post by: fearless on September 23, 2018, 04:09:28 AM
I had a look and realised it was because I was using a template that it had those values (copied text from dlg file from dialogasmain template to new project's dlg). Cant say why the values in the radasm fork has those values as they where probably there from the original source on sourceforge.

Maybe try add new dialog to see if it sets anything specifically for that font resource in a new dialog.
Title: Re: Adding Dialog "FONT 8,"MS Sans Serif",400,0"
Post by: bluedevil on September 24, 2018, 06:09:07 AM
After spending several hours on this issue; i have found that if i use my old templates from older versions of RadASM i got this buggy situation.
Today i made a dialog application and made a template for it. Guess what happen: no bugs no error.

From now on i wont use my old templates and will update them by creating newer versions using new RadASM 2.2.2.3.