Huw Davies (@huw) commented about dlls/user32/tests/clipboard.c:
- h = GetClipboardData( CF_BITMAP );
- ok( h == bitmap, "Expected bitmap %p, got %p.\n", bitmap, h );
- memset( &bmi, 0, sizeof(bmi) );
- bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
- result = GetDIBits( GetDC( 0 ), h, 0, 0, NULL, &bmi, 0 );
- todo_wine ok( !!result && result != ERROR_INVALID_PARAMETER, "GetDIBits failed: %#lx.\n", GetLastError() );
- bitmap = CreateBitmap( 10, 10, 1, 1, NULL );
- h = SetClipboardData( CF_DSPBITMAP, bitmap );
- ok( h == bitmap, "Expected bitmap %p, got %p.\n", bitmap, h );
- ok( !!DeleteObject( bitmap ), "DeleteObject failed.\n" );
- h = GetClipboardData( CF_DSPBITMAP );
- ok( h == bitmap, "Expected bitmap %p, got %p.\n", bitmap, h );
- memset( &bmi, 0, sizeof(bmi) );
- bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
- ok( !GetDIBits( GetDC( 0 ), h, 0, 0, 0, &bmi, 0 ), "GetDIBits returned unexpected value.\n" );
Ok, so Windows really does something different for CF_BITMAP as opposed to CF_DSPBITMAP, interesting.