Aide:GUICtrlCreateIcon.txt
De Wiki AutoIt Français
Document original V3.3.6.1 :
###Function###
GUICtrlCreateIcon
###Description###
Creates an Icon control for the GUI.
###Syntax###
GUICtrlCreateIcon ( filename, iconName, left, top [, width [, height [, style [, exStyle]]]] )
###Parameters###
@@ParamTable@@
filename
filename of the icon to be loaded.
iconName
Icon name if the file contain multiple icon. Can be an ordinal name if negative number. Otherwise -1.
left
The left side of the control. If -1 is used then left will be computed according to <a href="AutoItSetOption.htm#GUICoordMode">GUICoordMode.
top
The top of the control. If -1 is used then top will be computed according to <a href="AutoItSetOption.htm#GUICoordMode">GUICoordMode.
width
[optional] The width of the control (default is 32).
height
[optional] The height of the control (default is 32).
style
[optional] Defines the style of the control. See <a href="../appendix/GUIStyles.htm#Label">GUI Control Styles Appendix</a>.
default ( -1) : $SS_NOTIFY
forced styles : $WS_TABSTOP, $SS_ICON
exStyle
[optional] Defines the extended style of the control. See <a href="../appendix/GUIStyles.htm#Extended">Extended Style Table</a>.
@@End@@
###ReturnValue###
@@ReturnTable@@
Success: Returns the identifier (controlID) of the new control.
Failure: Returns 0.
@@End@@
###Remarks###
To set or change information in the control see <a href="GUICtrlUpdate Management.htm">GUICtrlUpdate...</a>.
To update the icon after the dialog box is displayed use <a href="GUICtrlSetImage.htm">GUICtrlSetImage</a>
iconID can reference the icon group number. Use a resource hacker to know the value.
To combine styles with the default style use <b>BitOr</b>($GUI_SS_DEFAULT_ICON, newstyle,...).
To use the values specified above you must #include <StaticConstants.au3> in your script.
Default resizing is $GUI_DOCKSIZE.
Passing a positive number will reference the string equivalent icon name.
Passing a negative number causes 1-based "index" behaviour. Some Dll can have icon extracted just with negative numbers.
###Related###
GUICoordMode (Option), GUICtrlSetImage, GUICtrlUpdate..., GUIGetMsg
###Example###
@@IncludeExample@@
Document traduit V3.3.6.1 :
###Function###
GUICtrlCreateIcon
###Description###
Crée un contrôle Icône pour une GUI.
###Syntax###
GUICtrlCreateIcon ( filename, iconName, left, top [, width [, height [, style [, exStyle]]]] )
###Parameters###
@@ParamTable@@
filename
Nom du fichier contenant l'icône à charger.
iconName
Nom de l'icône si le fichier contient plusieurs icônes. Peut être un nom ordinal en cas de nombre négatif. Sinon -1.
left
La distance à gauche du contrôle. Si -1 est utilisé alors il sera automatiquement déterminé par <a href="AutoItSetOption.htm#GUICoordMode">GUICoordMode</a>.
top
La distance en haut du contrôle. Si -1 est utilisé alors il sera automatiquement déterminé par <a href="AutoItSetOption.htm#GUICoordMode">GUICoordMode</a>.
width
[optionnel] La largeur du contrôle (32 par défaut).
height
[optionnel] La hauteur du contrôle (32 par défaut).
style
[optionnel] Définit le style du contrôle. voir <a href="../appendix/GUIStyles.htm#Label">GUI Control Styles Appendix</a>.
Défaut ( -1) : $SS_NOTIFY
Style forcé : $WS_TABSTOP, $SS_ICON
exStyle
[optionnel] Définit le style étendu du contrôle. Voir <a href="../appendix/GUIStyles.htm#Extended">Extended Style Table</a>.
@@End@@
###ReturnValue###
@@ReturnTable@@
Succès: Retourne l'identifiant (controlID) du nouveau contrôle .
Echec: Retourne 0.
@@End@@
###Remarks###
Pour définir ou modifier des informations dans le contrôle voir <a href="GUICtrlUpdate Management.htm">GUICtrlUpdate...</a>.
Pour mettre à jour l'icône après l'affichage de la boite de dialogue utilisez <a href="GUICtrlSetImage.htm">GUICtrlSetImage</a>
iconID peut indiquer le numéro du groupe d'icônes. Utilisez un hacker de ressources pour connaître la valeur.
Pour combiner des styles avec le style par défaut utilisez <b>BitOr</b>($GUI_SS_DEFAULT_ICON, nouveaustyle,...).
Pour utilisez les valeurs spécifiées ci-dessus vous devez inclure #include <StaticConstants.au3> dans votre script.
Redimensionnement par défaut : $GUI_DOCKSIZE.
Passer un nombre positif référencera la chaîne équivalente au nom de l'icône.
Passer un nombre négatif impliquera un "index" base 1. Certaines DLL peuvent voir leurs icônes extrait seulement avec des nombres négatifs.
###Related###
<a href="GUICoordMode.htm">GUICoordMode (Option)</a>, <a href="GUICtrlSetImage.htm">GUICtrlSetImage</a>, <a href="GUICtrlUpdate Management.htm">GUICtrlUpdate...</a>, <a href="GUIGetMsg.htm">GUIGetMsg</a>
###Example###
@@IncludeExample@@
Traducteur : ZOTHOP