flat assembler
Message board for the users of flat assembler.

Index > Windows > dynamic dialog

Author
Thread Post new topic Reply to topic
Kicer



Joined: 30 Apr 2005
Posts: 34
Location: Poland
Kicer 24 Mar 2006, 13:06
Hi, I have just started learning how to write windows' programs with asm.
i read some tutorials and i have a book, but it's for masm compilator and there are some differents in code. So i started to analyze fasm example codes and i have a question: how to create dynamic dialogbox? i mean without constans number and form dialog items?
Post 24 Mar 2006, 13:06
View user's profile Send private message Reply with quote
chris



Joined: 05 Jan 2006
Posts: 62
Location: China->US->China->?
chris 24 Mar 2006, 15:20
All controls/dialogboxes are ultimately created by using CreateWindow(Ex), you can look it up in MSDN.
Post 24 Mar 2006, 15:20
View user's profile Send private message Reply with quote
Kicer



Joined: 30 Apr 2005
Posts: 34
Location: Poland
Kicer 25 Mar 2006, 11:20
Thx i got it. But now i have another question.
How to set the same font in my dynamic button as in static one? (it's much bigger, and i couldn't find any info or example which could resolve this problem).
Post 25 Mar 2006, 11:20
View user's profile Send private message Reply with quote
Vasilev Vjacheslav



Joined: 11 Aug 2004
Posts: 392
Vasilev Vjacheslav 25 Mar 2006, 14:19
first you must create font with CreateFont, then use SendMessage with WM_SETFONT to set created font to control, and delete font handle before program termination with DeleteObject
Post 25 Mar 2006, 14:19
View user's profile Send private message Reply with quote
Kicer



Joined: 30 Apr 2005
Posts: 34
Location: Poland
Kicer 26 Mar 2006, 12:29
Thx, works Smile So now I have last question: that attributes has the standard button font ?
Post 26 Mar 2006, 12:29
View user's profile Send private message Reply with quote
Vasilev Vjacheslav



Joined: 11 Aug 2004
Posts: 392
Vasilev Vjacheslav 26 Mar 2006, 15:26
sorry, which attributes?
Post 26 Mar 2006, 15:26
View user's profile Send private message Reply with quote
SDragon



Joined: 13 Sep 2005
Posts: 19
Location: Siberia
SDragon 27 Mar 2006, 10:54
GetStockObject(SYSTEM_FONT). It returns HFONT.
Post 27 Mar 2006, 10:54
View user's profile Send private message Reply with quote
Kicer



Joined: 30 Apr 2005
Posts: 34
Location: Poland
Kicer 28 Mar 2006, 13:20
to Vasilev Vjacheslav: i meant what parameters should i give to CreateFont procedure to get font the same as is used with standard buttons created with static way.
Post 28 Mar 2006, 13:20
View user's profile Send private message Reply with quote
Vasilev Vjacheslav



Joined: 11 Aug 2004
Posts: 392
Vasilev Vjacheslav 28 Mar 2006, 14:43
why just don't look to msdn? Wink something like this

Code:
szScrollFont db "Tahoma",0

        invoke  CreateFont,12,NULL,NULL,NULL,FW_NORMAL,NULL,NULL,NULL,DEFAULT_CHARSET,OUT_DEFAULT_PRECIS,\
                CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,DEFAULT_PITCH,szScrollFont
    
Post 28 Mar 2006, 14:43
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.