Home > Net >  C # call ImageList_GetImageCount but the return value is always 0
C # call ImageList_GetImageCount but the return value is always 0

Time:12-15

Use the TreeView control in A program, and has the binding ImageList, in B programs need to grab A TreeView control of associated ImageList images in the program, by calling the Comctl32. ImageList_GetImageCount function under the DLL (ImageList handles have caught in A program, no fault,), but anyway have no results, always returns to zero, I have been tested in A program, you can catch the right return value, also suspect is not crawl across process at the beginning, but the system provides the function of the return value is an int, parameter is the handle to ImageList, so to ask you this may also is what problem,
Enclosed I search on bing an article, and I the same, but in the end also didn't see how to solve,
Title:
Problem Getting the Info From An External Window ` s ListView ImageList
Link: https://social.msdn.microsoft.com/Forums/en-US/260c91cb-98c5-4328-b6bd-20efe9273104/problem-getting-info-from-an-external-windows-listview-imagelist

CodePudding user response:

Articles may be wrong, I must have judgment ability, you can test, in the first page shows the inside of the ImageList item count, then you know it,

CodePudding user response:

The web page is my search and I have the same problem of post, this test for a long time is can't catch the imagecount return values, so stuck in here, I also is through the system message made another program all the Item and ImageList TreeVIew, in trying to achieve ImageList image information has been take not to come out, then after test, found that even the number of images also take not to come out, so it was very strange, hope, some directions to the master warrior
  •  Tags:  
  • C#
  • Related