Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Converting an HTTP time/date string to a SYSTEMTIME structure
Enumerating servers of the specified type (e.g. SQL Server) in the primary domain
GDI+: Drawing a Pie Chart
How to empty the Recycle Bin
Pocket PC: base class
Saving HKEY_LOCAL_MACHINE\\Software\\ODBC Registry Entries to an XML file
Testing if a connection to an Url can be established
Using the IsWindowEnabled function
Winsock: how to retrieve the protocol information corresponding to a protocol number
Creating an Open dialog box to specify the drive, directory, and name of a file to open (Shell32 version)
Disabling mouse and keyboard input for the main VFP window (with the app still running)
GDI+: Scrolling through large image using the mouse
GetFocus returns a HWND value
How to download a file from HTTP server using URL Monikers functions
How to retrieve number of objects in the Recycle Bin
Obtaining provider name for a specific type of network
Printing text with the Escape function
Using named pipes for interprocess communication
Using the DeleteFile
Using the RestartDialog function -- restarting Windows
Writing entries to custom Event Log
FindText -- the hopeless and useless Common Dialog
How to hide your program from the Close Program dialog (Win9* only)
MapiSendMail class for Visual FoxPro application
Creating the Save dialog box to specify the drive, directory, and name of a file to save

User rating: 8/10 (1 votes)
Rate this code sample:
  • ~
More code examples    Listed functions    Add comment     W32 Constants      Translate this page Printer friendly version of this code sample
Before you begin:

See also:
 
  Members area. Log in to view this example.
 
  User name:
  Password:
 
 
  Forgot your password?
 
  Sign up for
the Membership
 
 


User rating: 8/10 (1 votes)
Rate this code sample:
  • ~
5350 bytes  
Created: 2002-01-25 20:14:30  
Modified: 2011-12-10 09:20:22  
Visits in 7 days: 199  
Listed functions:
CommDlgExtendedError
GetActiveWindow
GetSaveFileName
GlobalAlloc
GlobalFree
GlobalSize
Printer friendly API declarations
My comment:
The OPENFILENAME structure length depends on the OS, and can be 76 or 88 bytes.

This is important, because invalid parameter creates an error. Note that this structure is used with GetOpenFileName and GetSaveFileName functions. There is substantial set of OFN flags to control the dialog behaviour.

To fill the OPENFILENAME structure -- as well as almost all other Comdlg structures used -- you need not just strings but pointers to strings. There is a class PChar in this examples, which creates such extended strings. In more simple cases the StrDup is quite enough to accomplish this task.
Word Index links for this example:
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
User Contributed Notes:
There are no notes on this subject.


Copyright © 2001-2013 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.1.55-log), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (50.16.132.180)
5 sec.Example: 'Class library providing access to the System Registry'
Language: 'Visual Basic'
13.23 min.Example: 'Terminating all running applications from a VFP program'
13.28 min.Function: 'SetMenu'
Function group: 'Menu'
13.37 min.Example: 'Using LoadLibrary'
53.02 min.Example: 'Displaying the color palette stored in an image file'
53.08 min.Example: 'How to obtain Content-Type value for a file type from the System Registry'
1.09 hrs.Example: 'GetFocus returns a HWND value'
 Example: 'Obtaining names and positions for shortcuts located on the Windows Desktop'
Language: 'C++'
1.44 hrs.Function: 'CeRapiFreeBuffer'
Function group: 'Remote Application Programming (RAPI)'
 Example: 'How to create a desktop shortcut (shell link)'
Google
Advertise here!