I wish to display a bitmap image that I have created in PhotoShop, as the
background on the main window of my application. This background will be
drawn by various procedures, and this part I have no problems. Now I know
that you should implement redraws in the TWindow.Paint method, and I have
done this, and as far as I can tell I can load the bitmap, and delete it
from memory, yet I can't seem to display it.
This is an abridged version of my override of the Paint method.
procedure TMainWindow.Paint(PaintDC: HDC; var PaintInfo: TPaintStruct);
var MyBit: HBitmap;
begin
MyBit := LoadBitmap(HInstance, MakeIntResource(255));
{I use this load the bitmap, 255 being the id code of the bitmap in my
resource file, which a load with the $R resource.res directive}
{This is where I want the code to go to display the bitmap}
DeleteObject(MyBit);
{This is how I delete the bitmap from memory, both this line, and the
LoadBitmap line come from examples in the ObjectWindows manual, on how to
load and delete bitmaps in memory}
{other overlay graphics or done here
end;
If anyone could please help me or give any advise could you please do so,
as soon as possible.
(Note: I'm using Windows 95, Borland Pascal 7.0 with Objects, and
ObjectWindows. And I have read the manuals, but I might have been head
butting a brick wall for all the good it did me. All the references
directed me to Chapter 17 in the ObjectWindows manual, which devotes a sum
total of two paragraphs to the subject, basically telling you it can be
done.)