Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Closing Windows
How to display picture stored in enhanced-format metafile (*.emf)
How to drag a Form not using its Titlebar or Caption
List of addresses in the AutoDial mapping database
GDI+: converting image file to another graphics format
GDI+: retrieving list of available image encoders and image decoders
How to initiate System shutdown
Reading Internet Query options
Using the CopyFile
DiskFreeSpace class
Pocket PC: custom RAPI class for operating with the Object Store Databases
Retrieving the IP-to-physical address mapping table
Retrieving the rectangle area where the mouse cursor is confined
Using named pipes for interprocess communication
Using the Semaphore object
GDI+: reading and writing metadata in JPEG and TIFF files
Hiding mouse cursor
Reading data from INI files
Saving available locale records into a cursor
Simple MAPI: how to resolve a name to unique address list entry
Starting a dialog box for connecting to network resources and passing input parameters
Storing registration key in the resources of an executable file
Who owns the Windows Clipboard
Current System information
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: 125  
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 (54.226.5.29)
5.3 hrs.Example: 'Setting the mouse capture to the specified window'
 Function: 'SetJob'
12.8 hrs.Function: 'GetMenuItemID'
 Function: 'FileIconInit'
Function group: 'Shell Functions'
13.15 hrs.Example: 'Using an Event Object. Part A: running an application that creates an Event object'
15.73 hrs.Example: 'Using Month Calendar Control (VFP9, Comctl32.dll)'
17.1 hrs.Function: 'SHRegCloseUSKey'
17.8 hrs.Function: 'GetDriveType'
Function group: 'File Management'
 Example: 'CryptoAPI: Collection of Providers class'
1 day(s)Example: 'Using WM_COPYDATA for interprocess communication (VFP9)'
Google
Advertise here!