Creates the image list control using the specified parameters.
#include "ltwrappr.h"
HWND LImageListControl::CreateControl(hWndParent, nID=0, dwStyle=WS_CHILD|WS_VISIBLE|WS_BORDER|WS_TABSTOP, x=0, y=0, nCx=200, nCy=200, crBackground=RGB(128,128,128))
Window handle of the parent window for the ImageList Control.
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.
Specifies the control's style, for example WS_VISIBLE, WS_BORDER, or WS_CHILD. For more information on Windows styles, refer to your compilers help file.
X coordinate for the origin of the ImageList Control window.
Y coordinate for the origin for the ImageList Control window.
The width of the ImageList Control window.
The height for the ImageList Control window.
The background color for the ImageList Control window.
Value | Meaning |
---|---|
!= NULL | The function was successful and the return value is the window handle for the created control. |
NULL | An error occurred, and the control could not be created. Refer to Return Codes. |
This function causes the class object to create the control window using the specified parameters.
This will fill in the m_hWnd data member with the handle to the new window.
If you call this function for a class object that already has a created window, the function will simply return m_hWnd.
You can destroy the ImageListControl window using the Windows function DestroyWindow.
NOTE: The window is created with the WS_EX_CLIENTEDGE style by default. To change this, you can use the Windows function SetWindowLong. For a list of available styles, refer to LTIMAGELISTCLASS Registered Class: Styles.
The ImageListControl window will send command notification messages to its parent window. For a table of the available command notifications, refer to ImageList Control Command Notifications.
The ImageList Control's parent window will receive these notifications in the form of a WM_COMMAND message.
Win32, x64.
L_INT LImageListControl__CreateControlExample(HWND hParent, LImageListControl& m_ImgList)
{
HWND hCtl = NULL;
hCtl = m_ImgList.CreateControl(hParent, 0);
if(!::IsWindow(hCtl))
AfxMessageBox(TEXT("Failed to create control!"));
return SUCCESS;
}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document