Using Win32 functions in Visual FoxPro Image Gallery
Message and Message Queue
Code examples:
Accessing Adobe Reader 7.0 main menu from VFP application
Browsing Windows Known Folders (Special Folders)
Controlling master audio volume by sending WM_APPCOMMAND messages
Creating irregularly shaped FoxPro form using transparency color key
Detecting changes in connections to removable drives (VFP9)
Displaying hypertext links with the SysLink control (VFP9, Comctl32.dll)
Displaying the associated icons and descriptions for files and folders
Enumerating devices installed on the local machine
Extended MessageBox Class
How to change the name and the size of the font in the MessageBox dialog
How to control Adobe Reader 9.0 (SDI mode) from VFP application
How to disable the Windows Clipboard (VFP9)
How to drag a Form not using its Titlebar or Caption
How to draw custom Window Caption on FoxPro form
How to start the screen saver and how to find whether the screen saver is active
How to view icons stored in executable files (Icon Viewer) - II
How to view system icons for the classes installed on the local machine
Moving shortcut to a specified position on the Windows Desktop
Obtaining names and positions for shortcuts located on the Windows Desktop
Round FoxPro form
System Image List Viewer
Using Common Controls: the Header Control
Using Month Calendar Control (VFP9, Comctl32.dll)
Using Video Capture: displaying on FoxPro form frames and previewing video obtained from a digital camera
Using WM_COPYDATA for interprocess communication (VFP9)
Windows Shell Icons displayed and exported to ICO files (Vista)
Obtaining names and positions for shortcuts located on the Windows Desktop

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
click to open
Before you begin:
This code sample shows how to retrieve names and positions of the shortcuts located on the Windows Desktop.

The VFP version of this code sample works with no changes on either 32-bit or 64-bit systems.

See also:
  • Moving shortcut to a specified position on the Windows Desktop
  • How to create a desktop shortcut
      Members area. Log in to view this example.
      User name:
      Forgot your password?
      Sign up for
    the Membership

    User rating: 0/10 (0 votes)
    Rate this code sample:
    • ~
    6854 bytes  
    Created: 2012-02-07 09:24:06  
    Modified: 2012-02-19 18:42:35  
    Visits in 7 days: 367  
    Listed functions:
    Printer friendly API declarations
    My comment:
    On the picture below, the window with title "FolderView" and class "SysListView32" is actually a ListView control. The OS uses this ListView control for displaying shortcuts on the Windows desktop.

    For manipulating ListViews, Windows has an exhaustive set of LVM macros. Each LVM macro wraps a call to the SendMessage API function.

    Take in account that the Desktop ListView belongs to a different process. That makes calling the LVM macros a bit more complex than if both a caller and a ListView had shared the same process. Some memory needs to be allocated directly in the address space of that process, and some data moved back and forth.

    And here is one more thing. On 64-bit system the Desktop ListView obviously belongs to a 64-bit process. And remember that Visual FoxPro is a 32-bit application.

    That 32 to 64-bit issue makes LVM calls that use the LVITEM structure even more convoluted. The structure clearly cannot be used as is. Instead some of its members (the pointers) must be "padded" with extra bytes to fit a pattern recognizable by 64-bit OS.
    Word Index links for this example:
    Translate this page:
      Spanish    Portuguese    German    French    Italian offers instant, free translations of text or web pages.
    User Contributed Notes:
    There are no notes on this subject.

    Copyright 2001-2018 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.39), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
    Last Topics Visited (
    7 sec.Example: 'How to put a vertical text scrolling on the form (a movie cast)'
    15 sec.Function: 'InternetGoOnline'
    Function group: 'Internet Functions (WinInet)'
    21 sec.Updates
    29 sec.Function: 'JetGetColumnInfo'
    Function group: 'Extensible Storage Engine (ESE, Jet Blue)'
    36 sec.Function: 'PathFindFileName'
    Function group: 'Shell Lightweight Utility APIs -- Path Functions'
    58 sec.Function: 'midiOutGetDevCaps'
    1.08 min.Updates
    1.2 min.Function: 'WNetEnumResource'
    Function group: 'Windows Networking'
    1.43 min.Function: 'CeGetStoreInformation'
    Function group: 'Remote Application Programming (RAPI)'
    1.55 min.Login
    Advertise here!