The TGlyphButton class creates a button with a bitmap in addition to text.
Using standard OWLNext glyphs
To use standard OWLNext glyph buttons:
- When linking to static OWLNext libraries, it is needed to include <owl/glyphbtn.rc> in the application resource file.
- When linking to dynamic OWLNext libraries, <owl/glyphbtn.rc> is not needed, as it is already included in OWLNext dlls
This code can handle both cases:
#if !defined(_OWLDLL)
#include <owl/glyphbtn.rc>
#endif
Using custom glyphs
To use custom glyphs for the buttons:
- Add <owl/glyphbtn.rh> to the application resource file.
- Add the glyphs in the resource file:
IDB_BORBTNII_OK BITMAP PRELOAD MOVEABLE DISCARDABLE "res/btn_ok.bmp"
IDB_BORBTNII_CANCEL BITMAP PRELOAD MOVEABLE DISCARDABLE "res/btn_canc.bmp"
IDB_BORBTNII_NO BITMAP PRELOAD MOVEABLE DISCARDABLE "res/btn_no.bmp"
IDB_BORBTNII_HELP BITMAP PRELOAD MOVEABLE DISCARDABLE "res/btn_hlp.bmp"
IDB_BORBTNII_ADD BITMAP PRELOAD MOVEABLE DISCARDABLE "res/btn_plus.bmp"
IDB_BORBTNII_DEL BITMAP PRELOAD MOVEABLE DISCARDABLE "res/btn_min.bmp"
IDB_BORBTNII_EDIT BITMAP PRELOAD MOVEABLE DISCARDABLE "res/btn_edit.bmp"
IDB_BORBTNII_KEY BITMAP PRELOAD MOVEABLE DISCARDABLE "res/btn_key.bmp"
IDB_BORBTNII_APPLY BITMAP PRELOAD MOVEABLE DISCARDABLE "res/btn_appl.bmp"
IDB_BORBTNII_REVERT BITMAP PRELOAD MOVEABLE DISCARDABLE "res/btn_rev.bmp"
IDB_BORBTNII_SETUP BITMAP PRELOAD MOVEABLE DISCARDABLE "res/btn_setp.bmp"
IDB_BORBTNII_BROWSE BITMAP PRELOAD MOVEABLE DISCARDABLE "res/btn_brws.bmp"