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
 
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00453018
Message ID:
00453398
Views:
29
Vlad,
While controls are windows in environments like VB and VC++ MFC, they are not in VFP. VFP renders a bitmap image of the control and that is what you see. SO there is no window handle to retrieve and manipulate.

I believe this goes back to the lagacy of having to deal with the MAC in VFP 3.0.

>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
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform