From 3e669eed4d718cdee4b4fd11794394619a35321b Mon Sep 17 00:00:00 2001 From: Steven Edwards Date: Tue, 11 Mar 2003 19:50:30 +0000 Subject: [PATCH] Added Demo for WM_ERASEBKGND - Contributed by Damon Chandler Windows2000 Graphics API Backbook svn path=/trunk/; revision=4287 --- .../apps/tests/wm_erasebkgnd/BACKBITMAP.BMP | Bin 0 -> 26566 bytes .../wm_erasebkgnd/Demo_WM_ERASEBKGND.cpp | 175 ++++++++++++++++++ reactos/apps/tests/wm_erasebkgnd/makefile | 66 +++++++ 3 files changed, 241 insertions(+) create mode 100644 reactos/apps/tests/wm_erasebkgnd/BACKBITMAP.BMP create mode 100644 reactos/apps/tests/wm_erasebkgnd/Demo_WM_ERASEBKGND.cpp create mode 100644 reactos/apps/tests/wm_erasebkgnd/makefile diff --git a/reactos/apps/tests/wm_erasebkgnd/BACKBITMAP.BMP b/reactos/apps/tests/wm_erasebkgnd/BACKBITMAP.BMP new file mode 100644 index 0000000000000000000000000000000000000000..38bc9716b64d087a7db51da3369be7766d930d30 GIT binary patch literal 26566 zcmXZF<(nK=mhQWQBLfp7l9@A$OQkBYO3Y}I*)q%6vYXW0YF4wlhdewU_OORNbI^zT z(7kaa^Tj?pcRHdxUh#hM$c-LC*+P!<>!xz-z>qA4SF+csvKmO5_yLeqa zt5n|q=+FPhEAr>P4?k3Q-?^{uzxS?spP%o&`;L15CqLo!5BUC}dguN3)SdhH)Vm*i zpx)!pyC1yId)`&|7N2=feZYI~^80uA{JVVS_Px96KG%5n{rCCo`&^sr@%lZ!zsvRC z<$CY&`g^Adq=&`&mVBj+jsA>uJ_bEUcWE*<>&YL{4L(|;o>^1jnCeF_dd_?p}Nmn z?!Nb)dUtW(yXqbO{SIrq%e_DNho7o@tmVUh_y^v1pY^}1Zr#4aweIp9teNj0^33nc zv)#YTbG)x^-nzx-KU6pG+-9xss9SvhfX{!(n%`kfw|LGELr?(-fpeTUa?@t(W)k)x~`IlL$LW9?UO z+)z8aXIbaFteL&Nb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Demo_WM_ERASEBKGND.cpp b/reactos/apps/tests/wm_erasebkgnd/Demo_WM_ERASEBKGND.cpp new file mode 100644 index 00000000000..582673f06bf --- /dev/null +++ b/reactos/apps/tests/wm_erasebkgnd/Demo_WM_ERASEBKGND.cpp @@ -0,0 +1,175 @@ + +// ------------------------------------------------------------------ +// Windows 2000 Graphics API Black Book +// Chapter 2 - CD-ROM (WM_ERASEBKGND Demo) +// +// Created by Damon Chandler +// Updates can be downloaded at: +// +// Please do not hesistate to e-mail me at dmc27@ee.cornell.edu +// if you have any questions about this code. +// ------------------------------------------------------------------ + +//*********************************************************// +// // +// SYNOPSIS: // +// This sample project demonstrates how to render // +// a background image in response to the WM_ERASEBKGND // +// message. It also shows how to create a transparent // +// static (text) control by handling the // +// WM_CTLCOLORSTATIC message. // +// // +//*********************************************************// + + +//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +#include +//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< + + +HINSTANCE HInst; +const char* WndClassName = "GMainWnd"; +LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam, + LPARAM LParam); + + +int APIENTRY WinMain(HINSTANCE HInstance, HINSTANCE HPrevInstance, + LPTSTR lpCmdLine, int nCmdShow) +{ + HInst = HInstance; + + WNDCLASS wc; + memset(&wc, 0, sizeof(WNDCLASS)); + + wc.style = CS_VREDRAW | CS_HREDRAW | CS_DBLCLKS; + wc.lpfnWndProc = MainWndProc; + wc.hInstance = HInstance; + wc.hCursor = LoadCursor(NULL, IDC_ARROW); + wc.hbrBackground = + reinterpret_cast(COLOR_BTNFACE + 1); + wc.lpszClassName = WndClassName; + + if (RegisterClass(&wc)) + { + HWND HWnd = + CreateWindow(WndClassName, + TEXT("WM_ERASEBKGND Demo"), + WS_OVERLAPPEDWINDOW | WS_CAPTION | + WS_VISIBLE | WS_CLIPSIBLINGS, + CW_USEDEFAULT, CW_USEDEFAULT, 205, 85, + NULL, NULL, HInstance, NULL); + + if (HWnd) + { + ShowWindow(HWnd, nCmdShow); + UpdateWindow(HWnd); + + MSG msg; + while (GetMessage(&msg, NULL, 0, 0)) + { + TranslateMessage(&msg); + DispatchMessage(&msg); + } + } + } + return 0; +} +//------------------------------------------------------------------ + + +// static text and bitmap-related variables +HWND HStatic; +HDC HMemDC; +HBITMAP HBmp, HOldBmp; +const char* filename = "BACKBITMAP.BMP"; + +LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam, + LPARAM LParam) +{ + switch (Msg) + { + case WM_CREATE: + { + HStatic = + CreateWindow(TEXT("STATIC"), TEXT("Static Text"), + WS_CHILD | WS_VISIBLE | SS_CENTER, + 10, 20, 175, 30, + HWnd, NULL, HInst, NULL); + + // create a memory DC compatible with the screen + HMemDC = CreateCompatibleDC(NULL); + if (HMemDC) + { + // load a DDB from file + HBmp = static_cast( + LoadImage(HInst, filename, IMAGE_BITMAP, + 0, 0, LR_LOADFROMFILE) + ); + if (HBmp) + { + // associate the DDB with the memory DC + HOldBmp = static_cast( + SelectObject(HMemDC, HBmp) + ); + } + } + } + case WM_CTLCOLORSTATIC: + { + if (reinterpret_cast(LParam) == HStatic) + { + HDC HStaticDC = reinterpret_cast(WParam); + SetBkMode(HStaticDC, TRANSPARENT); + + return reinterpret_cast( + GetStockObject(NULL_BRUSH) + ); + } + break; + } + case WM_ERASEBKGND: + { + BITMAP bmp; + if (GetObject(HBmp, sizeof(BITMAP), &bmp)) + { + RECT RClient; + GetClientRect(HWnd, &RClient); + + HDC Hdc = reinterpret_cast(WParam); + SetStretchBltMode(Hdc, COLORONCOLOR); + + // + // TODO: add palette handling code for + // palettized displays (see Chapter 9)... + // + + // render the background image + StretchBlt(Hdc, 0, 0, + RClient.right - RClient.left, + RClient.bottom - RClient.top, + HMemDC, 0, 0, bmp.bmWidth, bmp.bmHeight, + SRCCOPY); + return TRUE; + } + break; + } + case WM_DESTROY: + { + if (HBmp) + { + // free the bitmap + DeleteObject(SelectObject(HMemDC, HOldBmp)); + } + // free the memory DC + DeleteDC(HMemDC); + + PostQuitMessage(0); + return 0; + } + } + return DefWindowProc(HWnd, Msg, WParam, LParam); +} +//------------------------------------------------------------------ + + + diff --git a/reactos/apps/tests/wm_erasebkgnd/makefile b/reactos/apps/tests/wm_erasebkgnd/makefile new file mode 100644 index 00000000000..5c6818c00c1 --- /dev/null +++ b/reactos/apps/tests/wm_erasebkgnd/makefile @@ -0,0 +1,66 @@ +# Makefile - Proj_Demo_WM_ERASEBKGND.dsp + +ifndef CFG +CFG=Proj_Demo_WM_ERASEBKGND - Win32 Debug +endif +CC=gcc +CFLAGS= +CXX=g++ +CXXFLAGS=$(CFLAGS) +RC=windres -O COFF +ifeq "$(CFG)" "Proj_Demo_WM_ERASEBKGND - Win32 Release" +CFLAGS+=-fexceptions -O2 -DWIN32 -DNDEBUG -D_WINDOWS -D_MBCS -W +LD=$(CXX) $(CXXFLAGS) +LDFLAGS= +LDFLAGS+=-Wl,--subsystem,windows +LIBS+=-lkernel32 -luser32 -lgdi32 +else +ifeq "$(CFG)" "Proj_Demo_WM_ERASEBKGND - Win32 Debug" +CFLAGS+=-fexceptions -g -O0 -DWIN32 -D_DEBUG -D_WINDOWS -D_MBCS -W +LD=$(CXX) $(CXXFLAGS) +LDFLAGS= +LDFLAGS+=-Wl,--subsystem,windows +LIBS+=-lkernel32 -luser32 -lgdi32 +endif +endif + +ifndef TARGET +TARGET=WM_ERASEBKGND.exe +endif + +.PHONY: all +all: $(TARGET) + +%.o: %.c + $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -c $< + +%.o: %.cpp + $(CXX) $(CXXFLAGS) $(CPPFLAGS) -o $@ -c $< + +%.res: %.rc + $(RC) $(CPPFLAGS) -o $@ -i $< + +SOURCE_FILES= \ + Demo_WM_ERASEBKGND.cpp + +HEADER_FILES= + +RESOURCE_FILES= + +SRCS=$(SOURCE_FILES) $(HEADER_FILES) $(RESOURCE_FILES) + +OBJS=$(patsubst %.rc,%.res,$(patsubst %.cpp,%.o,$(patsubst %.c,%.o,$(filter %.c %.cpp %.rc,$(SRCS))))) + +$(TARGET): $(OBJS) + $(LD) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) + +.PHONY: clean +clean: + del $(OBJS) $(TARGET) Proj_Demo_WM_ERASEBKGND.dep + +.PHONY: depends +depends: + -$(CXX) $(CXXFLAGS) $(CPPFLAGS) -MM $(filter %.c %.cpp,$(SRCS)) > Proj_Demo_WM_ERASEBKGND.dep + +-include Proj_Demo_WM_ERASEBKGND.dep +