Message board for the users of flat assembler.
> Examples and Tutorials > Custom font & edit control colors.
I'd like to present here a program written with FASM that is a simple example demonstrating an easy way to use arbitrarily chosen font as well as text and background colors inside any edit control.
The font (in TTF or OTF format) is attached from the external file to the executable during compilation and is placed inside one of the application resources. When the application runs the custom font is extracted from the resource and temporarily placed in memory so we can use it in the same way as other fonts installed in the system. When the application ends the font is removed from the process memory - the system set of installed fonts doesn't change at the run of the program.
The change of the default colors used in the edit control is performed through the 'WM_CTLCOLOREDIT' message processing.
Here you can take a look at the program code:
; ; A simple program written with FASM that presents a way to use custom fonts and ; custom edit control colors