Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Wednesday, August 24, 2005 12:25:38 PM(UTC)

dlord57  
dlord57

Groups: Registered
Posts: 2


I am trying to get Owner Draw to work in the ImageList but the L_ILS_OWNERDRAWITEM style doesn't seem to have any effect. I am using the Raster Image Pro V.14 API, file versions are 14.0.0.13.

I am creating the image list like this:

hRet = CContainedWindow::Create( hWndParent, rcPos, NULL, dwStyle | L_ILS_OWNERDRAWITEM, dwExStyle, nID );

I've also tried setting the style using:

SetWindowLong( GWL_STYLE, dwStyle | L_ILS_OWNERDRAWITEM );

and even creating the window using

L_CreateImageListControl( dwStyle  | L_ILS_OWNERDRAWITEM, ....

but regardless, the ImageList draws the images itself without ever sending me the L_ILM_DRAWITEM message.

 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Tuesday, August 30, 2005 4:03:47 PM(UTC)

Amin  
Amin

Groups: Manager, Tech Support
Posts: 367

Was thanked: 1 time(s) in 1 post(s)

I tested the Owner Draw feature as follows:
1. Started with the main API demo LEADTOOLS14\examples\DLL\DEMO

2. In the file FRAME.C, added the following case to the outermost switch statement in the BrowseDlgProc function:
   case L_ILM_DRAWITEM:
      OutputDebugString("L_ILM_DRAWITEM \n");
      break;


3. Added the L_ILS_OWNERDRAWITEM flag to the first parameter in the call to L_CreateImageListControl in the same BrowseDlgProc function.


4. Compiled and ran the demo, went to the Image List menu and chose
"Load Database" and loaded a file. This caused the Debug String to be output every time an item is painted.


It might be that the message is sent to your image list, (at least in the last approach you used), but your code is not catching it properly.

Amin Dodin
LEADTOOLS Technical Support

Amin Dodin

Senior Support Engineer
LEAD Technologies, Inc.
LEAD Logo
 
#3 Posted : Wednesday, August 31, 2005 7:31:24 AM(UTC)

dlord57  
dlord57

Groups: Registered
Posts: 2


Thanks, I got it now. ATL message maps are a little confusing particularly when a CContainedWindow is involved. The message was comming to a different part of the message map than expected, plus I didn't expect the ImageList to draw the images at all once I turned on owner draw (that's what the documentation implies). Turns out the images get drawn automatically unless I correctly handle the draw item message.

 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.064 seconds.