Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Short and Sweet.
Message
From
25/11/1998 16:36:52
 
 
To
25/11/1998 16:23:02
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00161466
Message ID:
00161610
Views:
24
>>>What is a "HINSTANCE hinst" and how do I get a value for it?
>>
>>An HINSTANCE is a handle instance - it's a 4 byte DWORD.
>>
>>What are you trying to provide a handle to? IOW, what API call are you rying to invoke?)
>
>
>I am tring to call the createwindow api but I can't seem to get it to work.

The only HINSTANCE I see is a handle to the parent application, which is retrieved with GetModuleHandle():

DECLARE INTEGER GetModuleHandle IN WIN32API STRING lpModule

If a null is passed to GetModuleHandle(), it returns a handle to the file used to create the calling process (presumably VFP or a standalone .EXE here.) You can then pass the result of GetModuleHandle() as the HINSTANCE in CreateWindow().
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform