Author Topic: Example with custom button control  (Read 168 times)

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 5945
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Example with custom button control
« on: November 27, 2018, 01:59:28 AM »
I have this one close enough to add it to the library, its an interface with the custom title bar that is scaleable to different sizes and fonts, a 64 pixel icon, a background image that has links and a button on it. Its a test of the transparent button which means only the text shows with an optional border if required. The title can be aligned left, centre or right and the custom button has alignment control as well. The links are done with a button with no border and an underline font and are left aligned.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :biggrin:

sinsi

  • Member
  • *****
  • Posts: 1091
Re: Example with custom button control
« Reply #1 on: November 27, 2018, 12:10:46 PM »
When you create a button, why do you register the class every time? Isn't it better to register it once?
I can walk on water but stagger on beer bourbon.

Mikl__

  • Member
  • ****
  • Posts: 710
Re: Example with custom button control
« Reply #2 on: November 27, 2018, 12:12:58 PM »
Hi, hutch--!
Thank you very much for an interesting example!

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 5945
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: Example with custom button control
« Reply #3 on: November 27, 2018, 12:56:30 PM »
sinsi,

It mainly because its self contained as it is not practical to have a remote class that needs to be defined before you can use the control. It has a reasonably long argument list to avoid having to set structures or similar and it runs off the passed arguments.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :biggrin:

HSE

  • Member
  • ****
  • Posts: 856
  • <AMD>< 7-32>
Re: Example with custom button control
« Reply #4 on: November 28, 2018, 02:15:39 AM »
When you create a button, why do you register the class every time? Isn't it better to register it once?

Apparently only is registered once time.

Later you obtain an API error, because the class already exist.