Newsgroups: comp.windows.ms.programmer
Path: funic!news.funet.fi!sunic!psinntp!psinntp!wrldlnk!usenet
From: "Andrew W. Buchanan" <p00174@psilink.com>
Subject: Help with Background
Message-ID: <2931137881.1.p00174@psilink.com>
Sender: usenet@worldlink.com
Nntp-Posting-Host: 127.0.0.1
Organization: Cybernetic Frontiers
Date: Wed, 18 Nov 1992 02:05:14 GMT
X-Mailer: PSILink (3.2)

HELP! I'm new at windows programming and I seem to be having a little
problem.  I'm trying to make a window that has MARBLE.BMP that comes
with Windows as the background.  First I loaded the bitmap and then made
a brush out of it and made it the background brush for my window class.
Unfortunately, it only took the top-left 8x8 part of the bitmap. (The bitmap
is roughly 200x150.  Next I tried to draw a rectangle over my client area
using the brush as the filler, but it did the same thing. Below is what I'm
trying... Could someone tell me what I'm doing wrong?

	 hdc = BeginPaint (hwnd, &ps);

	 hBitmap = LoadBitmap (hMainInstance, "marble");
	 hBrush = CreatePatternBrush (hBitmap);
	 GetClientRect(hwnd, &rect);
	 FillRect(hdc, &rect, hBrush);
	 EndPaint(hwnd, &ps);

	 DeleteObject (hBrush);
	 DeleteObject (hBitmap);

					Thanks in advance,
						Andy Buchanan

