i am not working with dialogbox, (i don't like it jet ) ...
i create it with CreateWindowEx ... and i want to change the font of the botton...
Posted on 2003-02-12 16:57:20 by DrBios
Posted on 2003-02-13 07:39:22 by Hiroshimator
i gonna answer my self...:grin:
i mean FONT no TEXT

i create a FONT on my aplication with Createfont
---------------------------------- code --------------------------------------

.ELSEIF uMsg==WM_CREATE <----------------------------- on the create message of the window
invoke CreateFont,16,6,0,0,500,0,0,0, \
DEFAULT_CHARSET,0,0,0,\
DEFAULT_PITCH,ADDR font1
mov hfont, eax
--------------------------------------------------------------------------------

where:
font1 db 'Arial' <----------------- the name of some FOnt installed on the machine (of course ARIAL is it! )
hfont dd ? <----------------- and with this handle we can send it a message to any objec like editbox,listbox,buttons...etc (common controls)

then we send a message to our control

invoke SendMessage,hwndEdit,WM_SETFONT,hfont,1

and that's it ...the control will have the font you like :grin:
Posted on 2003-02-13 10:37:11 by DrBios
o :)

I thought you meant to say front of the button :o

my bad, sorry
Posted on 2003-02-13 12:09:53 by Hiroshimator

i gonna answer my self...:grin:
i mean FONT no TEXT

i create a FONT on my aplication with Createfont
---------------------------------- code --------------------------------------

.ELSEIF uMsg==WM_CREATE <----------------------------- on the create message of the window
invoke CreateFont,16,6,0,0,500,0,0,0, \
DEFAULT_CHARSET,0,0,0,\
DEFAULT_PITCH,ADDR font1
mov hfont, eax
--------------------------------------------------------------------------------

where:
font1 db 'Arial' <----------------- the name of some FOnt installed on the machine (of course ARIAL is it! )
hfont dd ? <----------------- and with this handle we can send it a message to any objec like editbox,listbox,buttons...etc (common controls)

then we send a message to our control

invoke SendMessage,hwndEdit,WM_SETFONT,hfont,1

and that's it ...the control will have the font you like :grin:


Since that is MASM syntax, you might get a quicker answer in the
MASM32 area :-) At least if you're looking for a MASM solution.
Cheers,
Randy Hyde
Posted on 2003-02-16 15:46:51 by rhyde