Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Does any body knows how can a make a custom shape button
Message
From
14/12/2000 10:06:42
 
 
To
13/12/2000 14:15:40
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00453018
Message ID:
00453332
Views:
35
Hi!

Read help on API functions like CreateEllipticRgn (Create*Rgn), and SetWindowRgn. Note that Button is separate window control that have its own window handle in windows. You can get window handle of any window and child window (control) using GetNextWindow API funtion (hope I wrote all API function names above correctly, because I have no access to API help files here). It should not be hard:

- Find HWND of button control window
- create region for it using Create*Rgn (and some other functions if you want to combine some more complex regions)
- use SteWindowRgn to apply region to button
- use SetWindowRgn with zero region handle to restore original button
- no need to clean up any resources - region will be cleared out automatically when you restore original region or destroy that window (destroy buttn or even form with that button).


>Hello:
>
>I was wondering if there is a way of making a round or triangle, etc, button on VFP using Windows API just like you do with windows. If there is I will really appreciate a sample.
>
>Thanks in advance!
>
>Mao
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform