#Define c0 chr(0) #Define WORD_Size 2 #Define DWORD_Size 4 #Define HWND_DESKTOP 0 #Define SRCCOPY 0x00CC0020 && dest = source #Define SRCINVERT 0x00660046 && dest = source XOR dest #Define BITMAP_Size (DWORD_Size*4) + (WORD_Size*2) + DWORD_Size ls_IconInfo = DWord( 1 ) + replicate( c0, 16 ) GetIconInfo( th_Icon, @ls_IconInfo ) lh_BitmapMask = Buff2Num( ls_IconInfo, (DWORD_Size*3)+1, .T. ) lh_BitmapColor = Buff2Num( ls_IconInfo, (DWORD_Size*4)+1, .T. ) ls_Bitmap = replicate( c0, BITMAP_Size ) GetObject( lh_BitmapColor, BITMAP_Size, @ls_Bitmap ) ln_Width = Buff2Num( ls_Bitmap, (DWORD_Size*1)+1, .T. ) ln_Height = Buff2Num( ls_Bitmap, (DWORD_Size*2)+1, .T. ) lh_DC = GetDC( HWND_DESKTOP ) ** Create compatible DC & Bitmap for the destination lh_DestDC = CreateCompatibleDC( lh_DC ) lh_Bitmap = CreateCompatibleBitmap( lh_DC, ln_Width, lh_Height ) lh_OldBitmap = SelectObject( lh_DestDC, lh_Bitmap ) ** Create a working (temporary) compatible DC lh_TempDC = CreateCompatibleDC( lh_DC ) * Select hBitmapColor from IconInfo to temp DC lh_OldTempBitmap = SelectObject( lh_TempDC, lh_BitmapColor ) * Copy to destination DC BitBlt( lh_DestDC, 0,0, ln_Width, ln_Height, lh_TempDC, 0,0, SRCCOPY ) * Select hBitmapMask from IconInfo to temp DC SelectObject( lh_TempDC, lh_BitmapMask ) * XOR to destination DC BitBlt( lh_DestDC, 0,0, ln_Width, ln_Height, lh_TempDC, 0,0, SRCINVERT ) *** *** Here... lh_Bitmap is contained the new bitmap with white background ***Now you can use that code in the article to save the bitmap or you can use GDI+ CreateFromHBitmap (???)