Put the bitmaps into the executable.
authorHartmut Birr <osexpert@googlemail.com>
Tue, 15 Nov 2005 17:52:27 +0000 (17:52 +0000)
committerHartmut Birr <osexpert@googlemail.com>
Tue, 15 Nov 2005 17:52:27 +0000 (17:52 +0000)
svn path=/trunk/; revision=19251

rosapps/tests/alphablend/alphablend.c
rosapps/tests/alphablend/alphablend.rc [new file with mode: 0644]
rosapps/tests/alphablend/alphablend.xml

index 0c3e96a..aea5d40 100644 (file)
@@ -85,8 +85,8 @@ BOOL ConvertBitmapTo32Bpp(HDC hDC, BITMAP *bmp)
     BitBlt(hDC, 0, 0, bmp->bmWidth, bmp->bmHeight, HMemDC, 0, 0, SRCCOPY);
 
     /* load and apply alpha channel */
-    bmpalpha = LoadImage(HInst, TEXT("lenaalpha.bmp"), IMAGE_BITMAP,
-                            0, 0, LR_LOADFROMFILE);
+    bmpalpha = LoadImage(HInst, MAKEINTRESOURCE(2000), IMAGE_BITMAP,
+                            0, 0, 0);
     if(bmpalpha)
     {
       COLORREF *col = pBmpBits;
@@ -131,8 +131,8 @@ LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam,
             /* load a bitmap from file */
             HBITMAP HBmp =
                /* static_cast<HBITMAP> */(
-                  LoadImage(HInst, filename, IMAGE_BITMAP,
-                            0, 0, LR_LOADFROMFILE)
+                  LoadImage(HInst, MAKEINTRESOURCE(1000), IMAGE_BITMAP,
+                            0, 0, 0)
                             );
             if (HBmp)
             {
diff --git a/rosapps/tests/alphablend/alphablend.rc b/rosapps/tests/alphablend/alphablend.rc
new file mode 100644 (file)
index 0000000..38dc9f3
--- /dev/null
@@ -0,0 +1,3 @@
+\r
+1000            BITMAP  MOVEABLE PURE   "lena.bmp"\r
+2000           BITMAP  MOVEABLE PURE   "lenaalpha.bmp"\r
index 785077e..9e19501 100644 (file)
@@ -2,7 +2,9 @@
        <define name="_WIN32_IE">0x0501</define>
        <define name="_WIN32_WINNT">0x0501</define>
        <define name="__USE_W32API" />
+       <include base="alphablend">.</include>
        <library>kernel32</library>
        <library>gdi32</library>
        <file>alphablend.c</file>
+       <file>alphablend.rc</file>
 </module>