flat assembler
Message board for the users of flat assembler.
Index
> Windows > Button styles |
Author |
|
thefool 19 Dec 2004, 09:12
Hi!
Im sorry this isnt directly a fasm question.. But i am using PureBasic to program in [wich is using fasm to compile!] I often see a lot of assembler programs that have such Light buttons or "RaiseWhenMouse over" buttons. http://www.anorak.nm.ru/ <-- Look at Crack Tricle. 100% asm. It has such special buttons and controls.. How do i make those buttons? With PB i can use api flags on GadGets[controls] but how do i make them look like that? Merry Xmas! Daniel |
|||
19 Dec 2004, 09:12 |
|
thefool 19 Dec 2004, 13:58
No one knowS?
|
|||
19 Dec 2004, 13:58 |
|
JohnFound 19 Dec 2004, 15:10
It is not too simple thing. You have several ways to do the job.
One possible approach is to use ownerdraw buttons and to repaint them on WM_MOUSEMOVE. Also, creating your own control can be one clear solution. Also, subclassing standard button will work. Simple solution is to set and clear BS_FLAT button style. Possible problem is that you can't exactly determine the moment when the mouse goes outside the button. Solution: On WM_MOUSEMOVE -> if "GetCapture" is not in your button, then the mouse just enters the button -> repaint it as active and "SetCapture" to the button. If on WM_MOUSEMOVE the "GetCapture" is to the button, then check is the cursor in or outside the button -> if the cursor is outside: repaint as inactive and "SetCapture NULL". Well, I hope it is at least a little clear. ...OK, I created simple example for such button. You will need Fresh 1.1.B or later to compile it. It uses automatic subclassing features of Fresh standard library and BS_FLAT approach described above. Regards.
|
|||||||||||
19 Dec 2004, 15:10 |
|
thefool 19 Dec 2004, 18:51
Thanks
So actually i have to let the button be FLAT when no mouse on it, and normal when mouse is on? |
|||
19 Dec 2004, 18:51 |
|
thefool 19 Dec 2004, 19:58
I know, but its still a bit nice..!
Anyway to remove the border around a flat button? |
|||
19 Dec 2004, 19:58 |
|
thefool 20 Dec 2004, 15:06
This was one way to do it.
Anyone knows about other ways? |
|||
20 Dec 2004, 15:06 |
|
thefool 22 Dec 2004, 11:15
anyone?
|
|||
22 Dec 2004, 11:15 |
|
JohnFound 22 Dec 2004, 12:12
google?
|
|||
22 Dec 2004, 12:12 |
|
Madis731 22 Dec 2004, 15:48
Win2000 has these buttons as standard - check your explorer or Mozilla window or QuickLaunch icons or whatever - they are everywhere.
|
|||
22 Dec 2004, 15:48 |
|
JohnFound 22 Dec 2004, 16:50
Madis731 wrote: Win2000 has these buttons as standard - check your explorer or Mozilla window or QuickLaunch icons or whatever - they are everywhere. No, all these buttons are not stand alone controls, but they are members of toolbar contol and every Windows, not only Win200 have such behaviour for toolbar buttons. Regards. |
|||
22 Dec 2004, 16:50 |
|
Madis731 23 Dec 2004, 14:58
oh ok :$ shame on me - RTFM
|
|||
23 Dec 2004, 14:58 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.