Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Accept Win32 user messages
Message
 
To
13/11/1997 21:28:24
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00059457
Message ID:
00060263
Views:
42
Thank you for your comments.

>What do you mean with "The declaration/utilization of the WinAPI in VFP seems to be so much cleaner than FPW26"?

What I mean is that in FPW26 you would have to use the undocumented FOXTOOLS's CallFn() RegFn() in order to use ani WinAPI functions, in VFP most of the API functions can be DECALREd; with a VFP statement.
And don't get me wrong, I am not too enthusiastic about using WinAPI in VFP, I would prefer that VFP dealt natively with this the type of functionality the WinAPI offers. I usually try, as much as possible, to stay away from using it for reasons that you mention in paragraphs 2,4,5 of your previous message, sometimes however you have no other alternative but to use WinAPI (and that's when threads like this develop). An I still believe that the (official) subject of this thread (Accept Win32 user messages) somehow implied the utilization of WinAPI.

And BTW, in order to make my life easier (and escape the humanly fear of the unknown) I try to learn as much as I can about WinAPI so I can cover any lacks/unclarity that the documentation might have.
But it seems that this was not the specific subject of this thread...

Sorin

>>I started to use calls to API functions in FPW26 and I'm still studying/using them on an as needed basis. The declaration/utilization of the WinAPI in VFP seems to be so much cleaner than FPW26, and it comes as a great complement to VFP.
>>That's why I appreciate any comments (that one might have) to using WinAPI in VFP (that makes the subject to which I was referring)
>>
>>Sorin
>
>My comments (on using Win32 API from VFP):
>
>1. Don't use an API function if you can use a VFP function. Unless you have good reasons to do it. :)
>2. Be careful when using API functions in a component that may be used in applications you don't know. Any DECLARE of a function will overwrite any previous declaration of the same function.
>3. Read carefully any docs/samples you can find about the function you wanna use.
>4. Test thoroughly the function you wanna use. The docs are not always correct and clear. Use the function only when you know exactly what you're doing.
>5. Many API functions allocate memory that must the released when no longer needed. Be careful and clear correctly the memory no longer needed.
>6. Don't use API functions just to be sophisticated! :)
>
>And a question:
>What do you mean with "The declaration/utilization of the WinAPI in VFP seems to be so much cleaner than FPW26"?
>
>Vlad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform