FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Non-standard Button
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Non-standard Button
Posted: Wed Jun 21, 2006 05:58 AM

I am trying to make a button that doesn't look like a button. I am wondering if I should just use a bitmap and then detect a click on it, or can the OWNERDRAW style be used to create a non-standard button? I don't really understand OWNERDRAW.

Any ideas?

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Non-standard Button
Posted: Wed Jun 21, 2006 06:30 AM

James,

Both ways will be ok. You can use a bitmap that shows a button -the way you want it-. Ownerdraw means that the control will not be painted by itself. You will be notified to paint it yourself.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Non-standard Button
Posted: Wed Jun 21, 2006 06:54 AM

Antonio,

Thanks. Is there an example in the \samples directory, or do you have an example of either method?

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 663
Joined: Mon Dec 05, 2005 11:22 PM
Non-standard Button
Posted: Wed Jun 21, 2006 02:22 PM

TSButton lets you have non standard buttons shapes.

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Non-standard Button
Posted: Wed Jun 21, 2006 04:36 PM

James,

You may review Class TSButton as Gale comments you.

Also, you may review FWH Class TButtonBmp to see how we change the standard painting of a button, though we don't use the ownerdraw style.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Non-standard Button
Posted: Fri Jun 23, 2006 04:40 PM

Gale and Antonio,

Thanks for the ideas, guys, I will look into them.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10

Continue the discussion