News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Adding Dialog "FONT 8,"MS Sans Serif",400,0"

Started by bluedevil, September 22, 2018, 04:27:09 PM

Previous topic - Next topic

bluedevil

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?
..Dreams make the future
But the past never lies..
BlueDeviL // SCT
My Code Site:
BlueDeviL Github

fearless

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.

bluedevil

@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 :)
..Dreams make the future
But the past never lies..
BlueDeviL // SCT
My Code Site:
BlueDeviL Github

BugCatcher

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

fearless

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.

bluedevil

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.
..Dreams make the future
But the past never lies..
BlueDeviL // SCT
My Code Site:
BlueDeviL Github