When create a window by CreateWindowEx,then how to Set font apply to all controls in the window?
CreateWindowEx does not allow you to set the font for child windows, however you can enumerate the child windows with EnumChildWindows (http://msdn.microsoft.com/en-us/library/windows/desktop/ms633494%28v=vs.85%29.aspx) passing the font handle in lParam of the enumeration procedure.
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.