🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: de.comp.lang.c++
1 messages
1 total messages Started by Hans-Heiner Schlachter Fri, 29 Mar 1996 09:35
Handle probleme bei Hintergrundbitmap (OWL C++)
#1936
Author: Hans-Heiner Schlachter
Date: Fri, 29 Mar 1996 09:35
85 lines
2400 bytes
Hallo da draussen,
Ich habe hier ein kleines Codefragment fuer die Anzeige
einer Hintergrundbitmap, wie sie auch unter dem Windows-
Setup erscheint. Leider ist es mir nicht moeglich, diese Bitmap
in das aktuelle Fenster anzuzeigen (sie wird immer zuerst geladen).
Die Ursache liegt wahrscheinlich in dem falsch uebergebenen 
Windowshandle. Kann mir jemand darauf eine Antwort und Loesung geben?
Vielen Dank im voraus
               Matthias Gottwald
e-mail an: werkstu@bipd.hl.siemens.de

//*********** Code ****************************************************
#include <owl\owlpch.h>
#include <stdio.h>
#include "test.rh"

#define APP_NAME    "INSTALL"        // Name der Anwendung

class TGDIWindow : public TWindow
{
public:
	 TGDIWindow();
	 virtual ~TGDIWindow();

protected:

	 virtual void SetupWindow();

private:
};

TGDIWindow::TGDIWindow() : TWindow(0,0,0)
{
	 Invalidate();
	 UpdateWindow();

	 TClientDC dc(*this);

	 TBitmap bmp(*GetModule(),BMP_PIC);

	 TMemoryDC memdc(dc);
	 memdc.SelectObject(bmp);

	 dc.BitBlt(20,20,bmp.Width(),bmp.Height(),memdc,20,20,SRCCOPY);

	 memdc.RestoreBitmap();
}

void TGDIWindow::SetupWindow()
{
	TWindow::SetupWindow();
}

TGDIWindow::~TGDIWindow()
{
}

class TGDIFrameWindow : public TFrameWindow
{
public:
	 TGDIFrameWindow (TWindow* parent, const char far *title = "",
							  TWindow *clientWnd = 0,
							  BOOL shrinkToClient = FALSE)
		  : TFrameWindow (parent, title, clientWnd, FALSE)
};

class TGDIApp : public TApplication
{
public:
	 TGDIApp() : TApplication() {}

	 void InitMainWindow()
	 {
		  SetMainWindow(new TGDIFrameWindow(0,APP_NAME,new TGDIWindow));
	 }
};


//#########################################################################
// M A I N
//#########################################################################
int OwlMain(int, char**)
{
  return TGDIApp().Run();
} 
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads