Author Topic: Adding Dialog "FONT 8,"MS Sans Serif",400,0"  (Read 294 times)

blue_devil

  • Member
  • **
  • Posts: 112
    • SCTZine
Adding Dialog "FONT 8,"MS Sans Serif",400,0"
« 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:
Code: [Select]
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:
Code: [Select]
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:
SCTZine Assembly

fearless

  • Member
  • ***
  • Posts: 362
    • LetTheLightIn
Re: Adding Dialog "FONT 8,"MS Sans Serif",400,0"
« Reply #1 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.
fearless

CM690II Case, HX1000 PSU, Asus Z97, Intel i7-4790K, Seidon 120v Cooler, 16GB DDR3, MSI GTX 980TI

www.LetTheLight.in  My Github  Twitter

blue_devil

  • Member
  • **
  • Posts: 112
    • SCTZine
Re: Adding Dialog "FONT 8,"MS Sans Serif",400,0"
« Reply #2 on: September 23, 2018, 01:42:24 AM »
@fearless thank you for your answer.

i have checked your code; for example this:
Quote
https://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:
SCTZine Assembly

BugCatcher

  • Regular Member
  • *
  • Posts: 43
Re: Adding Dialog "FONT 8,"MS Sans Serif",400,0"
« Reply #3 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

fearless

  • Member
  • ***
  • Posts: 362
    • LetTheLightIn
Re: Adding Dialog "FONT 8,"MS Sans Serif",400,0"
« Reply #4 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.
fearless

CM690II Case, HX1000 PSU, Asus Z97, Intel i7-4790K, Seidon 120v Cooler, 16GB DDR3, MSI GTX 980TI

www.LetTheLight.in  My Github  Twitter

blue_devil

  • Member
  • **
  • Posts: 112
    • SCTZine
Re: Adding Dialog "FONT 8,"MS Sans Serif",400,0"
« Reply #5 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.
..Dreams make the future
But the past never lies..
BlueDeviL // SCT
My Code Site:
SCTZine Assembly