Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Adding a background image to VFP report (VFP9, ReportListener)
Building a tree of subdirectories for a given path using FindFile functions
Creating a clipping region from the path selected into the device context of a form
Displaying system dialog that selects a folder
Enumerating network resources
GDI+: retrieving list of available image encoders and image decoders
How to generate GUID values
Winsock: reading email messages (POP3, port 110)
Adding user-defined items to the Control Menu of VFP form (requires VFP9)
Configuring DEVMODE structure for a printer
Converting an integer value to a hexadecimal string
GDI+: printing vertical text on VFP reports via generated images (VFP9)
Placing an arbitrary rectangular area of main VFP window on the Clipboard
Winsock: how to retrieve a service information corresponding to a port
Winsock: how to retrieve the protocol information corresponding to a protocol name
Retrieving names for the registered clipboard formats
Running a regular FoxPro form while main VFP window is minimized
Simple Window Viewer
Smart Card Database Query Functions
Exporting DLL icon resources as .ICO files
How to find which fonts Windows uses for drawing captions, menus and message boxes
Simple MAPI: how to pick an email recipient from Outlook Express address book
Converting twips to pixels and vice versa
Enumerating data formats currently available on the clipboard
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
Versions:
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:
      Password:
     
     
      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: 98  
    Listed functions:
    CloseHandle
    FindWindow
    GetCurrentProcess
    GetWindow
    GetWindowThreadProcessId
    IsWindow
    IsWow64Process
    OpenProcess
    ReadProcessMemory
    SendMessage
    VirtualAllocEx
    VirtualFreeEx
    WriteProcessMemory
    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  
    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.20.7.65)
    3 sec.Function: 'GetRgnBox'
    Function group: 'Region'
    6 sec.Example: 'Creating a clipping region from the path selected into the device context of a form'
    14.48 min.Example: 'How to check whether the system is 32-bit or 64-bit'
    14.53 min.Example: 'How to retrieve version information for the specified file'
    3.56 hrs.Example: 'How to create a service object'
     Example: 'How to display Windows On-Screen Keyboard'
    3.58 hrs.Function: 'JetBeginSession'
    Function group: 'Extensible Storage Engine (ESE, Jet Blue)'
    3.67 hrs.Example: 'Finding out if the current user is the Guest account'
    4.96 hrs.Example: 'Exporting DLL icon resources as .ICO files'
    4.97 hrs.Function: 'GdipResetWorldTransform'
    Function group: 'GDI+ Graphics'
    Google
    Advertise here!