 |
| Obtaining names and positions for shortcuts located on the Windows Desktop |
User rating: 0/10 (0 votes) | |
|
|
 |
 |
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 rating: 0/10 (0 votes) | |
| 6854 bytes Created: 2012-02-07 09:24:06 Modified: 2012-02-19 18:42:35 Visits in 7 days: 98 |
|
 |
 |
| Listed functions: |
 |
|
 |
 |
| 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: |
 |
|