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.comICQ #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.