hey, i've some problems with CreatePatternBrush. Following is a piece of code. the goal is to fill a ellipse with a bitmap. the problem is that the bitmap isn't displayed correctly. let's take for example that a make a ellipse that is 40*40 pixels. then i create a bitmap that has the same size and is filled with one color. when i draw the ellipse only some lines with the color are shown in the ellipse. is there a problem in the following code?
INVOKE GetDC,hWin mov myDC,eax INVOKE CreateSolidBrush,00000000h mov blackbrush,eax INVOKE CreateCompatibleDC,myDC mov backbuffer,eax INVOKE CreateCompatibleBitmap,myDC,screenrect.right,screenrect.bottom mov backbitmap,eax INVOKE SelectObject,backbuffer,backbitmap mov oldbit,eax INVOKE FillRect, backbuffer, ADDR screenrect, blackbrush invoke LoadBitmap,hInstance,2000 mov bmphandle,eax invoke CreatePatternBrush,eax mov brushhandle,eax invoke SelectObject,backbuffer,eax
Windows 95: Creating brushes from bitmaps or DIBs larger than 8x8 pixels is not supported. If a larger bitmap is specified, only a portion of the bitmap is used.
ouch! hehe :P but why does it work with a example i downloaded from the web? it displays a very big bitmap on the back of the window. there's bugs bunny and tweety on the bitmap, i'm sure you know that example. why does that work? and: is there another possibility to use a bigger bitmap to use in a brush to fill a ellipse? thanks in advance