Shell32PickIconDlg(IntPtr, String, Int32, Int32) Method
Displays a dialog box that allows the user to choose an icon from the
selection available embedded in a resource such as an executable or DLL file.
Namespace: DevCase.Win32.NativeMethodsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("Shell32.dll", CharSet = CharSet.Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)]
public static bool PickIconDlg(
IntPtr hWnd,
string iconPath,
int iconPathSize,
ref int refIconIndex
)
<DllImportAttribute("Shell32.dll", CharSet := CharSet.Auto, BestFitMapping := false,
ThrowOnUnmappableChar := true, SetLastError := true>]
Public Shared Function PickIconDlg (
hWnd As IntPtr,
iconPath As String,
iconPathSize As Integer,
ByRef refIconIndex As Integer
) As Boolean
Dim hWnd As IntPtr
Dim iconPath As String
Dim iconPathSize As Integer
Dim refIconIndex As Integer
Dim returnValue As Boolean
returnValue = Shell32.PickIconDlg(hWnd,
iconPath, iconPathSize, refIconIndex)
public:
[DllImportAttribute(L"Shell32.dll", CharSet = CharSet::Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)]
static bool PickIconDlg(
IntPtr hWnd,
String^ iconPath,
int iconPathSize,
int% refIconIndex
)
[<DllImportAttribute("Shell32.dll", CharSet = CharSet.Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)>]
static member PickIconDlg :
hWnd : IntPtr *
iconPath : string *
iconPathSize : int *
refIconIndex : int byref -> bool
No code example is currently available or this language may not be supported.
- hWnd IntPtr
-
The handle of the parent window. This value can be Zero.
- iconPath String
-
A pointer to a string that contains the null-terminated,
fully qualified path of the default resource that contains the icons.
If the user chooses a different resource in the dialog,
this buffer contains the path of that file when the function returns.
This buffer should be at least MAX_PATH characters in length, or the returned path may be truncated.
You should verify that the path is valid before using it.
- iconPathSize Int32
-
The number of characters in iconPath, including the terminating NULL character.
- refIconIndex Int32
-
A pointer to an integer that on entry specifies the index of the initial selection and,
when this function returns successfully, receives the index of the icon that was selected.
Boolean
Returns
if successful; otherwise,
.