Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Converting an HTTP time/date string to a SYSTEMTIME structure
Converting Unicode data from the Clipboard to a character string using a given code page
How to block the ALT+TAB shortcut (WinXP)
How to download this reference`s archive through WinInet functions using InternetOpenUrl
How to retrieve list of system DSNs (Data Source Name) with parameters
Obtaining I/O counts for the current process
Printing text on the main VFP window
Retrieving configuration information for the specified server (Win2000/XP)
Winsock: how to retrieve a service information corresponding to a port
Displaying printer-properties Property Sheet for the specified printer
Extended OS Version info
GDI+: Using Scale and Shear transformations
How to run FoxPro application under different user name (impersonating user)
Locking the workstation
Obtaining list of tables stored in an ODBC Data Source
Pocket PC: custom RAPI class for operating with the System Registry
Quering a waveform-audio input device
Retrieveing general information about the driver and data source associated with an ODBC connection
Using GetNearestColor
Using the DrawText function
Winsock: retrieving the host information corresponding to a network address
Connecting a local device to a network resource
Creating the Open dialog box to specify the drive, directory, and name of a file to open
Disk in drive A:
The original LoadPicture() function in VFP returns valid handles to bitmaps, icons, cursors, and metafiles

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
Before you begin:
Provide valid file names when calling this function.
DECLARE INTEGER GetObjectType IN gdi32 INTEGER h
#DEFINE OBJ_BITMAP    7
#DEFINE OBJ_METAFILE  9

LOCAL obj

* provide valid file names

= LoadObject("badge.bmp")
= LoadObject("BACKGRND.GIF")
= LoadObject("BD04956_.WMF")
= LoadObject("FILES10.ICO")
= LoadObject("H_POINT.CUR")

PROCEDURE LoadObject (lcFilename)
    LOCAL obj
    ? "Filename:", FULLPATH(lcFilename)

    IF FILE(lcFilename)
        obj = LoadPicture (lcFilename)
    ENDIF

    IF TYPE("obj") = "O"
        ? "Handle:", obj.handle
        ? "Handle type:", GetObjectType(obj.handle)
        ? "Width:", obj.width
        ? "Height:", obj.height
    ELSE
        ?? " -- not accessible"
    ENDIF
    ?


User rating: 0/10 (0 votes)
Rate this code sample:
  • ~
640 bytes  
Created: 2002-03-31 14:09:12  
Modified: 2003-04-23 22:22:10  
Visits in 7 days: 49  
Listed functions:
GetObjectType
Printer friendly API declarations
My comment:
The LoadPicture() function (note this is a VFP function, not Win32 one) loads bitmap files as well as GIF and JPEG files, converting them into memory bitmaps. So after all you get valid bitmap handle -- no need to implement Win32-based algorithms for reading GIFs and JPEGs.
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-2017 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.6.36), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.224.162.138)
9 sec.Function: 'NetGroupEnum'
Function group: 'Network Management'
18 sec.Function: 'Shell_NotifyIcon'
Function group: 'Shell Functions'
27 sec.Function: 'IsValidSid'
36 sec.Function: 'ReleaseDC'
44 sec.
Function group: 'Monitor Configuration (Vista)'
53 sec.Function: 'AVIStreamGetFrame'
Function group: 'Windows Multimedia'
1.02 min.Example: 'How to delete a service object'
1.18 min.Function: 'CeOpenDatabase'
Function group: 'Remote Application Programming (RAPI)'
1.35 min.Function: 'NetMessageNameDel'
Function group: 'Network Management'
1.52 min.Function: 'CryptHashData'
Function group: 'Cryptography Reference'
Google
Advertise here!