by Michael S. Kaplan, published on 2007/05/20 22:31 -04:00, original URI: http://blogs.msdn.com/b/michkap/archive/2007/05/20/2759135.aspx
Sometimes the questions and answers go by and I am just a spectator watching (either because I didn't know the answer so I was waiting myself to see what others came up with, or else because I wasn't looking at mail just then).
The question Patrick asked was:
Do you know a way to reverse (flip right-to-left) the items in an image list that you are loading with ImageList_LoadImage? I am trying to reverse the bitmaps in the list so they will display correctly on an RTL system. The ILC_PERITEMMIRROR flag seems like it would do what I want, but I can’t find a way to specify it to ImageList_LoadImage or to apply it to the ImageList later. Any help would be appreciated.
Now in this case it was actually due to both reasons (I wasn't looking at mail at the time and also I was not 100% sure about the answer). Luckily Raymond Chen knew the answer:
As you noticed, ImageList_LoadImage doesn't accept ILC flags. You'll have to do it manually. ImageList_Create + LoadImage + ImageList_Add (or AddMasked). That's all ImageList_LoadImage does anyway.
Now it turns out that in this case I knew part of the answer (the ImageList_Create call with the ILC_MIRROR flag), but since I didn't have the whole list handy, it is probably good that I waited. :-)
This post brought to you by ≒ (U+2252, a.k.a. APPROXIMATELY EQUAL TO OR THE IMAGE OF)
go to newer or older post, or back to index or month or day