>>
>>Actually, I had collected several hints. But Sergey's hints is the one that inspired me.
>>I just found your culprit. Take a look at your "IconBuddy.h" file.
>>
>>
>>** change this one
>>#define HANDLE long
>>
>>** to this one (whatever you like as long as it's unique)
>>#define API_HANDLE long
>>
>>
>
>Did You just hear that noise down there in Indonesia. That was my head I just banged against the table. Arrgh. This #define HANDLE long - stuff is from You, that's why it never came to my mind - I bet You did this on purpose, You little bastard. LOL
>
HAHAHAAHA.... NO WAY !!!
I never did that for a purpose like this. Honestly, this HANDLE thing never even cross my mind until now. Hehehe.....
>Copy and Paste is a programmer's death
>
>Sh... I don't believe this. I think I would have never seen this. And as the small class does not include the h-file it properly worked there, And also in the debugger, where Constants are *not* visible.
>
>I already said, I love You - be careful I might change sides BG
>
HAH, Don't you dare doing that!
>>
>> Also, change all your API declaration that uses HANDLE to API_HANDLE.
>>
>
>I might just change them to LONG
>
Yup. It could be safer (maybe) <bg>
>... #define handle long... I don't believe it hahahahahaha... shi.. where have You been all the days? Did You really have to go to Your office hahahahaha..
Yes I had to go there (I left at Monday morning). Somethings wrong with their data.
>
>this ist just tooo good!
>
>ROFL ROFL ROFL ROFL ROFL ROFL ROFL ROFL
ehehehhh... I got you real good. Hahahaha...
Oh, I forgot one more thing for cleaning up the GDI:
In Icon2Bitmap() you have this:
DeleteDC(lh_TempDC)
DeleteDC(lh_DestDC)
ReleaseDC(HWND_DESKTOP, lh_DC)
DeleteObject(lh_OldTempBitmap)
DeleteObject(lh_OldBitmap)
DeleteObject(lh_Bitmap)
DeleteObject(lh_BitmapColor)
DeleteObject(lh_BitmapMask)
if ! tlKeepHandle
this.DestroyIcon(thIcon)
endif
Change to this:
SelectObject( lh_TempDC, lh_OldTempBitmap )
SelectObject( lh_DestDC, lh_OldBitmap )
DeleteDC(lh_TempDC)
DeleteDC(lh_DestDC)
ReleaseDC(HWND_DESKTOP, lh_DC)
DeleteObject(lh_Bitmap)
DeleteObject(lh_BitmapColor)
DeleteObject(lh_BitmapMask)
if ! tlKeepHandle
this.DestroyIcon(thIcon)
endif
Herman