The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: Trope on September 23, 2005, 05:53:44 PM

Title: static control general question
Post by: Trope on September 23, 2005, 05:53:44 PM
Am I understanding this correctly - let's say I have numerous small bitmaps, buttons for example. Do I need to create a static control behind these bitmaps in order to check for a click event? Or is that just the preferred way? Or neither. Ultimately, I am learning ( or want to ) how to have numerous buttons that I can attach a click function to.

Thanks for any clarification on this matter,

Trope.

Ps. Been to MSDN. Still a little unclear.
Title: Re: static control general question
Post by: petezl on September 23, 2005, 08:19:40 PM
It would be easiest to stick the bitmaps on the buttons using BS_BITMAP style!

Peter.
Title: Re: static control general question
Post by: Trope on September 24, 2005, 01:04:07 AM
Can my button be of any size, and shape? If so, that sure would be ideal.

What if my button was a bitmap of a diamond? Could that work?
Title: Re: static control general question
Post by: petezl on September 24, 2005, 11:58:54 AM
The background form of all bitmaps and buttons are rectangular but can be any size!
Large bitmaps on buttons, especially if you use one image for Button-up and another for button-down tends to make the button sticky on slower machines.
To hide the button shape try BS_FLAT

Peter.
Title: Re: static control general question
Post by: jojo on September 24, 2005, 03:36:50 PM
If you need non-rectangular shapes, try creating regions with RgnHandle=CreatePolygonRgn(..), then check if mousekey is down and where for the created regions with PtInRegion(RgnHandle,X,Y)