WinSetFileIcon: Difference between revisions
Appearance
Created page with "WinSetFileIcon sets the icon for the file specified by pFileName to the icon specified by picon. ==Syntax== WinSetFileIcon(pFileName, picon); ==Parameters== ; pFileName (P..." |
mNo edit summary |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
WinSetFileIcon sets the icon for the file specified by pFileName to the icon specified by picon. | WinSetFileIcon sets the icon for the file specified by pFileName to the icon specified by picon. | ||
==Syntax== | ==Syntax== | ||
WinSetFileIcon(pFileName, picon) | WinSetFileIcon(pFileName, picon) | ||
==Parameters== | ==Parameters== | ||
; pFileName (PSZ) - input | ; ''pFileName'' ([[PSZ]]) - input:Pointer to file name. | ||
:Pointer to file name. | :A pointer to a zero-terminated string which contains the name of the file whose icon will be set. | ||
:A pointer to a zero-terminated string which contains the name of the file whose icon will be set. | ;''picon'' (PICONINFO) - input:A pointer to an ICONINFO structure containing an icon specification. | ||
;picon (PICONINFO) - input | |||
:A pointer to an ICONINFO structure containing an icon specification. | |||
==Returns== | ==Returns== | ||
; rc (BOOL) - returns | ;rc ([[BOOL]]) - returns:Success indicator. | ||
:Success indicator. | ::TRUE: Successful completion | ||
: | ::FALSE: Error occurred. | ||
: | |||
==Remarks== | ==Remarks== | ||
The specified icon is written to the file's .ICON extended attribute. | The specified icon is written to the file's .ICON extended attribute. | ||
==Example Code== | ==Example Code== | ||
Line 39: | Line 33: | ||
* [[WinLoadFileIcon]] | * [[WinLoadFileIcon]] | ||
* [[WinFreeFileIcon]] | * [[WinFreeFileIcon]] | ||
[[Category:Win]] | [[Category:Win]] |
Latest revision as of 20:34, 12 April 2024
WinSetFileIcon sets the icon for the file specified by pFileName to the icon specified by picon.
Syntax
WinSetFileIcon(pFileName, picon)
Parameters
- pFileName (PSZ) - input
- Pointer to file name.
- A pointer to a zero-terminated string which contains the name of the file whose icon will be set.
- picon (PICONINFO) - input
- A pointer to an ICONINFO structure containing an icon specification.
Returns
- rc (BOOL) - returns
- Success indicator.
- TRUE: Successful completion
- FALSE: Error occurred.
Remarks
The specified icon is written to the file's .ICON extended attribute.
Example Code
Definition
#define INCL_WINPOINTERS #include <os2.h> PSZ pFileName; /* Pointer to file name. */ PICONINFO picon; /* A pointer to an ICONINFO structure containing an icon specification. */ BOOL rc; /* Success indicator. */ rc = WinSetFileIcon(pFileName, picon);