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 11:14:41
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00453018
Message ID:
00453412
Views:
29
It is correct for many VFP controls, but not for all, I hope. It seems button, textbox, editbox and many otehr controls are standard windows controls. They rendered, yes, but they probably also have HWND. VFP just allows them to draw self in the memory DC, than applies that DC content together with other drawings (for example, drawings of shapes and grids) to the screen. I will make investigation and let know here. Is it not true? Is it true only for VFP 7?

>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
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