#include "ltwrappr.h"
virtual LRESULT LImageListControl::MsgProcCallBack(hWnd, uMsg, wParam, lParam)
HWND hWnd; |
handle to the bitmap window |
UINT uMsg; |
the window message |
WPARAM wParam; |
the first parameter of the window message |
LPARAM lParam; |
the second parameter of the window message |
This function is called for each message the image list control receives.
Parameter |
Description |
hWnd |
Handle to the bitmap window. |
uMsg |
The window message. |
wParam |
The first parameter of the window message. |
lParam |
The second parameter of the window message. |
The result of processing a specific message.
Override this function to do your own processing of window events and messages. If you override this function you will be called prior to the image list control's own message processing.
Required DLLs and Libraries
LTDIS For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application. |
Win32, x64.
Functions: |
|
Topics: |
// define user LImageListControl class to override CallBack
/*<struct>*/
#ifdef LMyImgList
class LMyImgList : public LImageListControl
{
public:
LMyImgList();
virtual ~LMyImgList();
virtual LRESULT MsgProcCallBack( HWND hWnd,UINT uMsg,WPARAM wParam,LPARAM lParam);
virtual L_VOID ItemSelected(L_INT nCtlID, pLILITEMSEL pItemSel);
};
#endif // #ifdef LMyImgList
/*</struct>*/
LMyImgList::LMyImgList()
{
}
LMyImgList::~LMyImgList()
{
}
LRESULT LMyImgList::MsgProcCallBack(HWND hWnd,UINT uMsg,WPARAM wParam,LPARAM lParam)
{
UNREFERENCED_PARAMETER(wParam);
CString csOut;
if(uMsg == WM_MOUSEMOVE)
{
L_INT nIndex;
POINT Point;
Point.x = LOWORD(lParam);
Point.y = HIWORD(lParam);
nIndex = HitTest(&Point);
if(nIndex >= 0)
{
csOut.Format(TEXT("Item# %ld at X: %ld , Y: %ld"), nIndex, LOWORD(lParam), HIWORD(lParam));
::SetWindowText(::GetParent(hWnd), csOut);
}
else
{
csOut.Format(TEXT("X: %ld , Y: %ld"), LOWORD(lParam), HIWORD(lParam));
::SetWindowText(::GetParent(hWnd), csOut);
}
return TRUE;
}
return FALSE;
}
L_VOID LMyImgList::ItemSelected(L_INT nCtlID, pLILITEMSEL pItemSel)
{
UNREFERENCED_PARAMETER(nCtlID);
CString csOut;
csOut.Format(TEXT("Item #%ld Selected!"), pItemSel->lIndex);
AfxMessageBox(csOut);
}
// create the control
L_INT LImageListControl__MsgProcCallBackExample(HWND hParent, LMyImgList m_MyImgList)
{
// create the control
if(m_MyImgList.CreateControl(hParent, 0, WS_VISIBLE|WS_BORDER|WS_CHILD|WS_TABSTOP, 100, 300) == NULL)
return FAILURE;
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
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.