Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
How to change display settings: screen resolution, screen refresh rate
Enumerating data formats currently available on the clipboard
Adding and deleting Scheduled Tasks using NetScheduleJob API functions
Winsock: sending email messages (SMTP, port 25)
Mapping and disconnecting network drives
Winsock: retrieving directory listing from an FTP server using passive data connection (FTP, port 21)
Capturing keyboard activity of another application with the Raw Input API (VFP9)
Custom GDI+ class
Converting Unicode data from the Clipboard to a character string using a given code page
Disk in drive A:
How to display the Properties dialog box for a file (ShellExecuteEx)
Enumerating network resources
Detecting changes in connections to removable drives (VFP9)
Enumerating raw input devices attached to the system (keyboard, mouse, human interface device)
Using EnumPrinters function to enumerate locally installed printers
How to download a file from the FTP server using FtpGetFile
How to play AVI file on the _screen
Retrieving the name of the network resource associated with a local device
Creating a console window for Visual FoxPro application
Custom HttpRequest class (WinHTTP)
Running MSDOS Shell as a child process with redirected input and output (smarter RUN command)
Custom FTP Class for Visual FoxPro application
How to put a horizontal text scrolling on the form (a news line)
Deleting files into the Recycle Bin
Getting a bit more than the _CLIPTEXT offers

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:
When you select a fragment of an application data to the Windows Clipboard, most often this is not just a raw ASCII text format you find later in, but several more data formats.



On the picture above a web page is shown that has a fragment selected and copied to the clipboard. Windows Clipboard stores this fragment in at least four different formats. The HTML format is shown.


To find out how many of them are involved when a fragment from a MS Word document is copied to the clipboard -- run this code.

This code sample shows how to access several text-related data formats stored in the Clipboard. To test it Cut or Copy some data to the clipboard. Select data from MS Office documents, web pages, Notepad files and so on.
 
  Members area. Log in to view this example.
 
  User name:
  Password:
 
 
  Forgot your password?
 
  Sign up for
the Membership
 
 


User rating: 0/10 (0 votes)
Rate this code sample:
  • ~
4437 bytes  
Created: 2002-02-21 12:49:43  
Modified: 2008-12-03 15:26:21  
Visits in 7 days: 131  
Listed functions:
CloseClipboard
GetActiveWindow
GetClipboardData
GetLastError
IsClipboardFormatAvailable
OpenClipboard
RegisterClipboardFormat
Printer friendly API declarations
My comment:
Two Clipboard Data Formats: HTML Format and Rich Text Format are not standard but the registered ones. To reach data for these formats you have to register them first. Use the RegisterClipboardFormat function. If they are already registered by another application this function returns their actual Ids.

Differently from the standard Clipboard Formats with constant numeric Ids, these two are linked to constant strings.

Read the HTML Clipboard Format article on the MSDN.

The Netscape 6 browser supports the HTML Format. Its earlier version 4.75, and the Opera 5 -- both do not. So after all, this is how the application decides: to store or not to store.

Somehow this example extends the _CLIPTEXT functionality (CF_TEXT is the only supported format). And dont forget that more Clipboard data formats are available.
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 (107.22.156.205)
13.73 min.Function: 'GdipCreateBitmapFromGraphics'
6.75 hrs.Function: 'LocalFree'
 Example: 'Using GetFileSize'
 Function: 'GetSaveFileName'
7.34 hrs.Example: 'Subclassing CommandButton control to create BackColor property'
8.72 hrs.Example: 'Creating a mailslot'
 Function: 'BlockInput'
Function group: 'Keyboard Input'
9.28 hrs.Function: 'SHFileOperation'
 Function: 'mciGetErrorString'
Function group: 'Windows Multimedia'
12.83 hrs.Function: 'AttachVirtualDisk'
Google
Advertise here!