Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Does any body knows how can a make a custom shape button
Message
 
 
À
13/12/2000 14:15:40
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00453018
Message ID:
00453332
Vues:
36
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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform