Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Setting the mouse capture to the specified window
Switching between keyboard layouts
Testing Clipboard functions: emptying the clipboard
Uploading file to the FTP server using InternetWriteFile
Using Change Notification Objects to monitor changes to the printer or print server
Using FrameRgn for displaying system colors
Adding supplementary data to AVI files
Converting an HTTP time/date string to a SYSTEMTIME structure
GDI+: cropping images
GDI+: Drawing a Pie Chart
Testing if a connection to an Url can be established
Using GetNearestColor
Creating an Open dialog box to specify the drive, directory, and name of a file to open (Shell32 version)
Enumerating the subkeys for a given registry key
How to enumerate cookies and URL History entries in the cache of the local computer
Retrieving long values associated with the class of the VFP window
Using the DeleteFile
Winsock: retrieving the standard host name and IP address for the local machine
Enumerating servers of the specified type (e.g. SQL Server) in the primary domain
How to empty the Recycle Bin
MapiSendMail class for Visual FoxPro application
Tracking mouse movement to detect when to start dragging
Using named pipes for interprocess communication
Using the RestartDialog function -- restarting Windows
Using the FindMediaType function

User rating: 0/10 (0 votes)
Rate this code sample:
  • ~
More code examples    Listed functions    Add comment     W32 Constants      Translate this page Printer friendly version of this code sample
 
DO decl 
 
#DEFINE S_OK  0 
 
#DEFINE CFSTR_MIME_AIFF         "audio/aiff" 
#DEFINE CFSTR_MIME_AVI          "video/avi" 
#DEFINE CFSTR_MIME_BASICAUDIO   "audio/basic" 
#DEFINE CFSTR_MIME_BMP          "image/bmp" 
#DEFINE CFSTR_MIME_FRACTALS     "application/fractals" 
#DEFINE CFSTR_MIME_GIF          "image/gif" 
#DEFINE CFSTR_MIME_HTML         "text/html" 
#DEFINE CFSTR_MIME_JPEG         "image/jpeg" 
#DEFINE CFSTR_MIME_MPEG         "video/mpeg" 
#DEFINE CFSTR_MIME_PDF          "application/pdf" 
#DEFINE CFSTR_MIME_PJPEG        "image/pjpeg" 
#DEFINE CFSTR_MIME_POSTSCRIPT   "application/postscript" 
#DEFINE CFSTR_MIME_QUICKTIME    "video/quicktime" 
#DEFINE CFSTR_MIME_RAWDATA      "application/octet-stream" 
#DEFINE CFSTR_MIME_RAWDATASTRM  "application/octet-stream" 
#DEFINE CFSTR_MIME_RICHTEXT     "text/richtext" 
#DEFINE CFSTR_MIME_TEXT         "text/plain" 
#DEFINE CFSTR_MIME_TIFF         "image/tiff" 
#DEFINE CFSTR_MIME_WAV          "audio/wav" 
#DEFINE CFSTR_MIME_XBM          "image/xbm" 
#DEFINE CFSTR_MIME_X_AIFF       "audio/x-aiff" 
#DEFINE CFSTR_MIME_X_ART        "image/x-jg" 
#DEFINE CFSTR_MIME_X_BITMAP     "image/x-xbitmap" 
#DEFINE CFSTR_MIME_X_EMF        "image/x-emf" 
#DEFINE CFSTR_MIME_X_MSVIDEO    "video/x-msvideo" 
#DEFINE CFSTR_MIME_X_PNG        "image/x-png" 
#DEFINE CFSTR_MIME_X_REALAUDIO  "audio/x-pn-realaudio" 
#DEFINE CFSTR_MIME_X_SGI_MOVIE  "video/x-sgi-movie" 
#DEFINE CFSTR_MIME_X_WAV        "audio/x-wav" 
#DEFINE CFSTR_MIME_X_WMF        "image/x-wmf" 
 
    CREATE CURSOR csResult (mediatype C(30), clipformat I) 
 
    = FindType(CFSTR_MIME_AIFF) 
    = FindType(CFSTR_MIME_AVI) 
    = FindType(CFSTR_MIME_BASICAUDIO) 
    = FindType(CFSTR_MIME_BMP) 
    = FindType(CFSTR_MIME_FRACTALS) 
    = FindType(CFSTR_MIME_GIF) 
    = FindType(CFSTR_MIME_HTML) 
    = FindType(CFSTR_MIME_JPEG) 
    = FindType(CFSTR_MIME_MPEG) 
    = FindType(CFSTR_MIME_PDF) 
    = FindType(CFSTR_MIME_PJPEG) 
    = FindType(CFSTR_MIME_POSTSCRIPT) 
    = FindType(CFSTR_MIME_QUICKTIME) 
    = FindType(CFSTR_MIME_RAWDATA) 
    = FindType(CFSTR_MIME_RAWDATASTRM) 
    = FindType(CFSTR_MIME_RICHTEXT) 
    = FindType(CFSTR_MIME_TEXT) 
    = FindType(CFSTR_MIME_TIFF) 
    = FindType(CFSTR_MIME_WAV) 
    = FindType(CFSTR_MIME_XBM) 
    = FindType(CFSTR_MIME_X_AIFF) 
    = FindType(CFSTR_MIME_X_ART) 
    = FindType(CFSTR_MIME_X_BITMAP) 
    = FindType(CFSTR_MIME_X_EMF) 
    = FindType(CFSTR_MIME_X_MSVIDEO) 
    = FindType(CFSTR_MIME_X_PNG) 
    = FindType(CFSTR_MIME_X_REALAUDIO) 
    = FindType(CFSTR_MIME_X_SGI_MOVIE) 
    = FindType(CFSTR_MIME_X_WAV) 
    = FindType(CFSTR_MIME_X_WMF) 
 
    GO TOP 
    BROW NORMAL NOWAIT 
 
PROCEDURE FindType (lcMediaType) 
    LOCAL lnClipformat 
    lnClipformat = 0 
    IF FindMediaType(lcMediaType, @lnClipformat) = S_OK 
        INSERT INTO csResult VALUES (lcMediaType, lnClipformat) 
    ELSE 
        INSERT INTO csResult VALUES (lcMediaType, -1) 
    ENDIF 
 
PROCEDURE decl 
    DECLARE INTEGER FindMediaType IN urlmon; 
        STRING rgszTypes, INTEGER @rgcfTypes 
 
 

User rating: 0/10 (0 votes)
Rate this code sample:
  • ~
2986 bytes  
Created: 2002-04-07 18:38:43  
Modified: 2002-04-07 18:39:01  
Visits in 7 days: 59  
Listed functions:
FindMediaType
Printer friendly API declarations
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.36.153)
4 sec.Example: 'Simple printer queue monitor: deletes, pauses, resumes print jobs for local printer'
6.62 min.Example: 'Exporting DLL icon resources as .ICO files'
6.68 min.Function: 'GdipCreateFromHDC'
Function group: 'GDI+ Graphics'
25.75 min.Example: 'Accessing Windows Control Panel from VFP Application'
25.82 min.Function: 'GdipSaveImageToFile'
25.87 min.Example: 'How to fill a buffer with random bytes using Cryptography API Functions'
39.05 min.Example: 'Simple MAPI: how to pick an email recipient from Outlook Express address book'
39.15 min.Function: 'InternetOpenUrl'
1.68 hrs.Example: 'Round FoxPro form'
 Example: 'Using the IsWindowEnabled function'
Google
Advertise here!