ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Windows functions / System functions
  • Associating an application with a file extension
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
SysRecentDocAdd (Function)
In french: SysDocRécentAjoute
Adds a file into the list of recently opened documents. This list is managed by the shell of Windows.
Remark: Then, this document can be opened by ShellExecute if its extension was associated with an application (via the "Open with" context menu or via the registry).
Example
IF OpenMyDocument(DocPath) = True THEN
SysRecentDocAdd(DocPath)
END
Syntax
<Result> = SysRecentDocAdd(<File path>)
<Result>: Boolean
  • True if the document was added into the list of recently opened documents,
  • False otherwise. ErrorInfo returns the cause of the error.
<File path>: Character string
Path of the file that must be added to the list of recently opened documents. This path can be a character string in Unicode or Ansi format.
Remarks

Associating an application with a file extension

To associate an application with a file extension via the registry, you must create the following keys:
  • "HKEY_CLASSES_ROOT\.ext":
    where ext is the extension.
    The default value corresponds to the type of file (free string).
  • "HKEY_CLASSES_ROOT\type_name":
    where type_name is the name of the type given to the extension.
    The default value corresponds to the description that will be displayed in the "Type" column of the Windows explorer.
  • "HKEY_CLASSES_ROOT\type_name\shell\open\command":
    The default value is the command that will be run by ShellExecute on this type of file. In the command line, the %1 string will be replaced by the path of the file.
Related Examples:
WD Jump lists Training (WINDEV): WD Jump lists
[ + ] JumpList in Windows 7

A JumpList is a menu accessible from the Start menu or from the application icon in the taskbar.
It is used to display the documents recently or frequently opened by the application. It is also used to display the specific tasks.

This example handles images and some operations are directly accessible from the JumpList.
Component: wd290std.dll
Minimum version required
  • Version 15
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/22/2023

Send a report | Local help