Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
FindWindow() VFP from Word
Message
From
23/09/1998 04:50:48
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00139394
Message ID:
00139724
Views:
93
Klas,
George is right. FindWindow gets 2 parameters, class and title. If any of the parameters you pass null, everything matches :

FindWindow(Class,Title) && Check both match
FindWindow(0,Title) && Any class match
FindWindow(Class,0) && Any title match
FindWindow(0,0) && Any class and title match
* Fox code
function fWin 
lParameters tuClass, tuWinTitle
DECLARE integer FindWindow in WIN32API string cClass, string cWinName
hWnd = FindWindow(tuClass,tuWintitle)
clear dlls
return hWNd

? fwin("Fox_4000001","Microsoft Visual FoxPro") && 824
? fwin("Fox_4000001",0)                         && 832
? fwin(0,"Microsoft Visual FoxPro")             && 824
? fwin(0,0)                                     && 904
Here interesting thing with only one instance of VFP (development), fwin("Fox_4000001",0) and fwin(0,"Microsoft Visual FoxPro") return different values (where is the main fox window ?). And many VFP window with same title return only first.

I would also test it for you in word if I knew how to write and test that in word.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform