The MASM Forum Archive 2004 to 2012

General Forums => The Workshop => Topic started by: Apocalyps on March 14, 2007, 09:30:56 AM

Title: Round button / Button with region ?
Post by: Apocalyps on March 14, 2007, 09:30:56 AM
Hello,

I have a question, and that is how to create a round button in masm from a bitmap, does it has to be with a region ?

Like (http://vhreve.nl/button.bmp) so that only the round button is clickable and not the purple part arround it, or like a triangle button.

I know it works with XXControls, but does someone know how i can get this working without it ?

Thnx!  ::)
Title: Re: Round button / Button with region ?
Post by: TNick on March 14, 2007, 10:03:12 AM
Welcome!

You create a round button in masm exactly as you creat it in any other language. :)
As far as I know, you can
- use regions
- create your own control and
     - use trigonometric math to see if a point is inside or outside the circle.
     - define a rectangle that approximate the circle

Nick
Title: Re: Round button / Button with region ?
Post by: PBrennick on March 15, 2007, 03:22:35 PM
Apocalyps,
The attached example shows you how to create buttons that are of all different shapes, sizes and colors. It is exactly what you need, I think.

Paul


[attachment deleted by admin]