logoalt Hacker News

cpncrunchtoday at 3:32 PM1 replyview on HN

I find this cute and amusing, having had to write buttons in assembly language in the 80s, drawing the buttons into video memory using blits.


Replies

sumtechguytoday at 3:45 PM

I did something similar in win16/32 at one point. Think we wanted something special with graphics on the button.

We basically had to recreate all of the actions of focus/unfocus/etc. Everything a normal button could do. Now that I have done more stuff I a know for a fact I made my life way harder than it should have been and could have subclassed. But it was a full button recreation. Styling messaging and all. You have to watch for things like what if someone clicks outside of your button but lets go inside the button. What does that mean? All sorts of weird side effects. What if your button has focus and someone starts typing? What if someone clicks outside of your button but holds the button down as they slide across your button? What does that look like?

Would I ever do it again. Probably not. Seriously use the built in ones.