|
-
Jul 7th, 2001, 01:07 AM
#1
Thread Starter
Lively Member
"ImageList_ReplaceIcon" API function problems
Hey everybody. I'm trying to use the "ImageList_ReplaceIcon" API function to add an icon to an ImageList. Although I haven't tested it with non-VB ImageLists, all the sites I referred to blatantly imply that it does work with VB ImageLists. Thus, I have been completely baffled as to what to do.
PHP Code:
Public Declare Function ImageList_ReplaceIcon Lib "comctl32.dll" _
(ByVal hImageList As Long, ByVal i As Long, ByVal hIcon As Long) _
As Long
With myhiml being ImageList.hImageList, -1 -- -1 adds it to the end of the list. I have also tried 0 and still came up error -- being the index, and hIcon being the icon to add to it.
PHP Code:
retval = ImageList_ReplaceIcon(myhiml, -1, hIcon)
However, it does not add it to the list; and I'm frankly getting a bit annoyed, too, because API calls can sometimes give me problems. Oh, by the way, the function returns -1, implying error.
If anybody can help me, please reply. Your response will be greatly appreciated.
- Justin Patrick Butler
Comme je trouve. "As I find."
- Butler family quote
Beneficia sumptos procul superant. "The benefits far exceed the costs."
- Myself
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|