L_CreateImageListControl

Summary

Creates the image list control as a child of the specified parent window.

Syntax

#include "ltlst.h"

L_LTLST_API HWND L_CreateImageListControl(dwStyle, x, y, nWidth, nHeight, hWndParent, nID, crBack)

Parameters

DWORD dwStyle

Window styles for the ImageList Control window. This can be any normal window style, or ImageList style. For more information on ImageList styles, refer to LTIMAGELISTCLASS Registered Class: Styles.

L_INT x

Original horizontal position for the ImageList Control window.

L_INT y

Original horizontal position for the ImageList Control window.

L_INT nWidth

Original width for the ImageList Control window.

L_INT nHeight

Original height for the ImageList Control window.

HWND hWndParent

Window handle of the parent window for the ImageList Control.

L_INT nID

ID for the ImageList Control. You can use this to identify the control when you process WM_COMMAND notification messages that the control will send to its parent window.

COLORREF crBack

The background color for the ImageList Control window.

Returns

Value Meaning
> 0 The function was successful, and returns the handle to the ImageList Control window.
< 0 An error occurred. Refer to Return Codes.

Comments

You can destroy the ImageListControl window using the Windows function DestroyWindow.

When the ImageList Control DLL loads, it registers a window class. The name for the ImageListControl window is:

#define LTIMGLISTCLASS   TEXT("LEADIMGLIST") 

You can use this class name to create an ImageList Control in your application's resource file (.RC). If you specify an ID when creating the control, you can use the Windows function GetDlgItem to get the window handle of the ImageListControl.

Notes:

Required DLLs and Libraries

Platforms

Win32, x64.

See Also

Functions

Topics

Example

#define IDC_LEADIMAGELIST 1200 
 
L_INT CreateImageListControlExample(HWND hWndParent, HWND * phCtl) 
{ 
   /* create the image list control */ 
   *phCtl = L_CreateImageListControl(WS_CHILD|WS_VISIBLE|WS_BORDER, 
                                   10,                /* x location       */ 
                                   10,                /* y location       */ 
                                   250,               /* width            */ 
                                   250,               /* height           */ 
                                   hWndParent,        /* parent window    */ 
                                   IDC_LEADIMAGELIST, /* control ID       */ 
                                   RGB(128,128,128)); /* background color */ 
   if(!IsWindow(*phCtl)) 
   { 
      MessageBox(hWndParent, TEXT("Error creating control"), TEXT("Error"), MB_OK); 
      return 0; 
   } 
   return SUCCESS; 
} 
Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.