Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Setting the volume label
Simulating DOEVENTS
GDI+: converting text strings to images and saving in a graphics file
Reading keys in the specified section of the Win.ini file
Retrieving the IP-to-physical address mapping table
Retrieving Window Class information for the VFP window
Another way to go online (it is not about choosing an ISP)
Basic Volume information
How to fill a buffer with random bytes using Cryptography API Functions
Obtaining information about all user accounts on a server (WinNT only)
Pocket PC: System Registry Viewer
Retrieving IP statistics for the computer
Retrieving the name of the primary domain controller (PDC) and join status information (NT/2000/XP)
Returning some basic information for the specified INF file
Using an Event Object. Part A: running an application that creates an Event object
Using an Event Object. Part B: running an application responding to events
Using LoadLibrary
Determining whether or not the system is connected to the Internet
Displaying the drive type value
Enumerating connections made to a shared resource for the local computer (WinNT only)
GDI+: enumerating fonts installed on the system
A procedure for setting file times
Converting characters to upper or lower case
Finding parameters for the region specified
Retrieving names for the registered clipboard formats

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
 
LOCAL lcBuffer, lnResult, hFormat, ii, lcName
#DEFINE cmBufsize  250
 
* registering a new format
hFormat = RegisterClipboardFormat ("NewlyRegisteredFormat")
? "New format registered:", hFormat
 
CREATE CURSOR csResult (id N(6), name C(250))
 
* Registered clipboard formats are identified by values 
* in the range 0xC000 through 0xFFFF
 
FOR ii=49152 TO 65535
    lcBuffer = Repli(Chr(0), cmBufsize)
    lnResult = GetClipboardFormatName (ii, @lcBuffer, cmBufsize)
 
    IF lnResult <> 0
        lcName = Left(lcBuffer, lnResult)
        INSERT INTO csResult VALUES (ii, lcName)
    ENDIF
ENDFOR
 
IF hFormat <> 0
    LOCATE ALL FOR id = hFormat
ELSE
    GO TOP
ENDIF
BROWSE NORMAL NOWAIT
 
PROCEDURE  decl
    DECLARE INTEGER GetClipboardFormatName IN user32;
        INTEGER format, STRING @lpszFormatName,;
        INTEGER cchMaxCount
 
    DECLARE INTEGER RegisterClipboardFormat IN user32;
        STRING lpszFormat
 
 
 

User rating: 0/10 (0 votes)
Rate this code sample:
  • ~
910 bytes  
Created: 2002-01-27 13:08:13  
Modified: 2002-01-27 13:23:18  
Visits in 7 days: 120  
Listed functions:
GetClipboardFormatName
RegisterClipboardFormat
Printer friendly API declarations
My comment:
Registered clipboard formats are identified by values in the range 0xC000 through 0xFFFF.

Under my WinMe system this example returns valid names as long as some garbage. Or it just seems like a garbage for me? After all this is another system nook where something can be stored until next reboot or shutdown.

The RegisterClipboardFormat is one-way road -- from a given name to a number within the [0xC000..0xFFFF] range. Though it takes no time to scan the range to define whether a cliboard format name is already registered.
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 (54.226.5.29)
4 sec.Example: 'GDI+: printing vertical text on VFP reports via generated images (VFP9)'
1.39 hrs.Function: 'CeDeleteFile'
1.63 hrs.Gallery
Page 8
5.59 hrs.Example: 'GDI+: printing vertical text on VFP reports via generated images (VFP8)'
 Example: 'Drawing icons associated with the VFP main window'
15.68 hrs.Example: 'Testing Clipboard functions: emptying the clipboard'
 Function: 'AVIFileOpen'
21.44 hrs.Function: 'NetScheduleJobEnum'
Function group: 'Network Management'
 Example: 'Using vendor-neutral SQL constructs'
1 day(s)Function: 'GetAclInformation'
Function group: 'Security'
Google
Advertise here!