Quantcast
Channel: Using Win32 (WinAPI) Functions in Microsoft Visual FoxPro
Viewing all 142 articles
Browse latest View live

Code sample: Browsing Windows Known Folders (Special Folders)

$
0
0
Special Folders are folders which are presented to the user through an interface as an abstract concept, instead of an absolute folder path.



As of Windows Vista, those folders are referenced by a new set of GUID values called Known Folder IDs, replacing the older system of referring to standard folders by a CSIDL value.

Code sample: Displaying Windows shell folders in TreeView control with Visual FoxPro FLL

$
0
0
TreeViewExtender.FLL (download from the web page) is a dynamic-link library compiled in Visual FoxPro FLL format. Combined with this library, a regular TreeView ActiveX control displays shell folders in attractive and convenient way. It can also automatically reflect folder changes happening on a host computer (VFP9).



Features:
- a regular TreeView control is used (MSComctlLib.TreeCtrl)
- FLL can monitor folder changes in multiple roots
- VFP9 forms can receive folder change notifications via window messages (VFP9)
- older VFP versions can poll recent folder changes using Timer control
- folders are depicted using appropriate system images (no extra graphics required)
- the tree displays compressed (zipped) folders (Vista)
- no API declarations in VFP code, the complexity moved inside the FLL
- the FLL has small footprint -- about 40 KB
- minimal client: Windows XP, VFP8 (7?)
- compiled in VS2005 (VC++ 8.0 runtime)

FileSystemWatcher ActiveX Control. Coming soon.

$
0
0
This ActiveX control listens to the file system change notifications (files and directories on a specified path created, deleted, renamed or changed) and raises events, notifying the host about the changes. The control is optimized for single threaded environments, like Visual FoxPro application.

LanguageBar ActiveX Control. Coming Soon.

$
0
0
This ActiveX control displays active input language for the current process, and allows switching between registered input languages.



It can also freeze selected input language preventing it from being accidentally changed. Through this control, other input controls on a form can be locked to using specific input languages.

LanguageBar and FileSystemWatcher, new ActiveX controls

API function: DeleteMenu

$
0
0
Deletes an item from the specified menu. If the menu item opens a menu or submenu, this function destroys the handle to the menu or submenu and frees the memory used by the menu or submenu.

API function: DrawMenuBar

$
0
0
Redraws the menu bar of the specified window. If the menu bar changes after the system has created the window, this function must be called to draw the changed menu bar.

ContextMenu ActiveX Control. Coming soon.

$
0
0
The ContextMenu ActiveX Control (ATL COM) is designed for generating and displaying shortcut menus. A generated menu is object-oriented: menu items are accessible during runtime, can be modified, added and deleted. A menu can be exported to XML string, as well as loaded from a XML string. Not compatible with MNX format.


Youtube video: MenuDesigner for Visual FoxPro ContextMenu control

$
0
0
Fast and easy creation of object-oriented context menus in Visual FoxPro.

Youtube video: Visual FoxPro ContextMenu control (ActiveX)

$
0
0
Fast and easy creation of object-oriented context menus in Visual FoxPro. The control is placed on VFP form and populated

ScreenCapture library (FLL) for Visual FoxPro

$
0
0
Captures images of VFP forms, other windows, and parts of a screen. Saves a captured image to a file (BMP, JPEG, PNG, TIFF, GIF), sends to the clipboard, prints, or opens a preview. Supports image scaling and clipping. Optionally prints a multiline description above a captured image. Allows storing metadata in captured files. Find usage examples, list of functions, trial and full version downloads.

API function: RegisterClassEx

$
0
0
Registers a window class for subsequent use in calls to the CreateWindow or CreateWindowEx function.

API function: UnregisterClass

$
0
0
Unregisters a window class, freeing the memory required for the class.

Code sample: Displaying dimmed window behind VFP top-level form

$
0
0
This code sample explains how to create a dimmed window, and position it beneath a VFP top level form -- creating so called "Lightbox effect".

Progress Dialog Library (FLL) for Visual FoxPro coming soon

$
0
0
Progress Dialog FLL is a wrapper around IProgressDialog interface implemented in Shell32.dll. It exposes methods that provide options for Visual FoxPro application to display a progress dialog box.


Progress Dialog Library (FLL) for Visual FoxPro -- demo and full versions available for download

$
0
0
Full version includes complete C++ source code.

Subscription to advanced content

$
0
0
Get 3, 6, or 12 months subscription to access advanced code samples and features.

Code sample: How to check whether the system is 32-bit or 64-bit

$
0
0
The IsWow64Process function determines whether the specified process is running under WOW64.

Code sample: How to obtain positions for Windows Desktop shortcuts

$
0
0
This code sample shows how to retrieve names and positions of the shortcuts located on the Windows Desktop.

Code sample: Moving shortcut to a specified position on the Windows Desktop

$
0
0
Before testing this code sample, uncheck "Auto arrange icons" and "Align icons to grid" options in the context menu on the Windows desktop.



On the VFP form, each round Shape control corresponds to a shortcut located on the Windows Desktop.

On initialization, the form reads the desktop shortuct locations and then arranges the shapes accordingly. Moving a shape on the form also moves the corresponding desktop shortcut (not otherwise, though it is also achievable).

See also:
  • Obtaining names and positions for shortcuts located on the Windows Desktop
  • Viewing all 142 articles
    Browse latest View live