News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

CreateWindowEx Set Font

Started by enevil, March 13, 2012, 05:18:02 AM

Previous topic - Next topic

enevil

When create a window by CreateWindowEx,then how to Set font apply to all controls in the window?

donkey

CreateWindowEx does not allow you to set the font for child windows, however you can enumerate the child windows with EnumChildWindows passing the font handle in lParam of the enumeration procedure.
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

sinsi

If you creae the child windows in the main window's WM_CREATE handler you just create them then send a WM_SETFONT message to them with your font handle.
Light travels faster than sound, that's why some people seem bright until you hear them.