9
votes
Vote UpVote

A new way to select and apply a VCL Style in Runtime

The Road to Delphi – Typically we use a combobox or listbox to allow to the final user select and appy a VCL Style, Today I will show you a new way using the system menu of the form. First you need to use the GetSystemMenu WinApi function  to get a  handle to the system menu of the form. Then using the AppendMenu or the InsertMenuItem methods you can customize the system menu, from here you must store the identifier of the new menu item added and finally process the WM_SYSCOMMAND message to launch an action. Check the next commented code uses System.Rtti, System.Classes, System.Generics.Collections, ...
Favorite? Off-Topic? Rodrigo @ 2014-02-12 20:42

Statistics

Visits: 888
Votes: 9
Favorites: 1
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

Alister Christie
Andreas Schachtner
François
gomsun2
Horbs
Jørn E. Angeltveit
Neonimous
Radosław Kokoć
Wouter
Subscribe:
Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News

Sponsor

 
Please login or register to use this functionality.
(click on this box to dismiss)