<div>Hola a todos,</div> <div>estuve navegando por las páginas alemanas y encontré la siguiente Función que teóricamente refleja una imagen de distintas formas. Intente utilizarla, pero no me resulta. Talvez alguien me pueda indicar cómo debo llamar a esa función en mi programa. Gracias por toda respuesta.</div> <div>Abel</div> <div> </div> <div><FONT color=#008000>#include <windows.h></FONT><BR><BR><FONT color=#008000>#define BITMAP_FLIP_NONE 0</FONT><BR><FONT color=#008000>#define BITMAP_FLIP_HORIZONTAL 1</FONT><BR><FONT color=#008000>#define BITMAP_FLIP_VERTICAL 2</FONT><BR><FONT color=#008000>#define BITMAP_FLIP_BOTH 3</FONT><BR><BR><FONT color=#000080><I>// Der erste Paramter ist optional; in den allermeistenn Faellen wird hier NULL
uebergeben</I></FONT><BR><FONT color=#000080><I>// Der zweite Parameter ist das zu spiegelnde Bitmap.</I></FONT><BR><FONT color=#000080><I>// Der dritte Parameter bestimmt die Art der Spiegelung:</I></FONT><BR><FONT color=#000080><I>// - 0: Es wird einfach eine Kopie des Bitmaps gezogen</I></FONT><BR><FONT color=#000080><I>// - 1: Das Bitmap wird horizontal gespiegelt</I></FONT><BR><FONT color=#000080><I>// - 2: Das Bitmap wird vertikal gespiegelt</I></FONT><BR><FONT color=#000080><I>// - 3: Das Bitmap wird sowohl horizontal als auch vertikal gespiegelt</I></FONT><BR><FONT color=#000080><I>//</I></FONT><BR><FONT color=#000080><I>// Das zurueckgelieferte Bitmap muß mit DeleteObject wieder geloescht werden,</I></FONT><BR><FONT color=#000080><I>// wenn es nicht mehr benoetigt wird.</I></FONT><BR>EXTERN_C HBITMAP FlipBitmap(HDC hdcRef, HBITMAP hBitmap, <B>int</B> nFlip)<BR>{<BR> HBITMAP hbmpDst, hbmpSrc;<BR>
BITMAP bm;<BR> HDC hdcSrc, hdcDst;<BR><BR> <B>static const int</B> nMultiplier[<FONT color=#ff0080>4</FONT>][<FONT color=#ff0080>4</FONT>] =<BR> {<BR> { <FONT color=#ff0080>0</FONT>, <FONT color=#ff0080>0</FONT>, <FONT color=#ff0080>1</FONT>, <FONT color=#ff0080>1</FONT> },<BR> { <FONT color=#ff0080>1</FONT>, <FONT color=#ff0080>0</FONT>, -<FONT color=#ff0080>1</FONT>, <FONT color=#ff0080>1</FONT> },<BR> { <FONT color=#ff0080>0</FONT>, <FONT color=#ff0080>1</FONT>, <FONT color=#ff0080>1</FONT>, -<FONT color=#ff0080>1</FONT> },<BR> { <FONT color=#ff0080>1</FONT>, <FONT color=#ff0080>1</FONT>, -<FONT color=#ff0080>1</FONT>, -<FONT
color=#ff0080>1</FONT> }<BR> };<BR><BR> <B>if</B>(nFlip > BITMAP_FLIP_BOTH)<BR> {<BR> SetLastError(ERROR_INVALID_PARAMETER);<BR> <B>return</B>(NULL);<BR> }<BR><BR> <B>if</B>(!GetObject(hBitmap, <B>sizeof</B>(BITMAP), &bm))<BR> <B>return</B>(NULL);<BR><BR> hdcSrc = CreateCompatibleDC(hdcRef);<BR> hdcDst = CreateCompatibleDC(hdcRef);<BR> hbmpSrc = (HBITMAP)SelectObject(hdcSrc, (HGDIOBJ)hBitmap);<BR> hbmpDst = CreateCompatibleBitmap(hdcSrc, bm.bmWidth, bm.bmHeight);<BR> hbmpDst = (HBITMAP)SelectObject(hdcDst, (HGDIOBJ)hbmpDst);<BR><BR> SetMapMode(hdcDst, MM_ANISOTROPIC);<BR> SetWindowOrgEx(hdcDst, <FONT
color=#ff0080>0</FONT>, <FONT color=#ff0080>0</FONT>, NULL);<BR> SetWindowExtEx(hdcDst, bm.bmWidth, bm.bmHeight, NULL);<BR> SetViewportOrgEx(hdcDst, bm.bmWidth * nMultiplier[nFlip][<FONT color=#ff0080>0</FONT>], bm.bmHeight * nMultiplier[nFlip][<FONT color=#ff0080>1</FONT>], <BR> NULL);<BR> SetViewportExtEx(hdcDst, bm.bmWidth * nMultiplier[nFlip][<FONT color=#ff0080>2</FONT>], bm.bmHeight * nMultiplier[nFlip][<FONT color=#ff0080>3</FONT>], <BR> NULL);<BR><BR> BitBlt(hdcDst, <FONT color=#ff0080>0</FONT>, <FONT color=#ff0080>0</FONT>, bm.bmWidth, bm.bmHeight, hdcSrc, <FONT color=#ff0080>0</FONT>, <FONT color=#ff0080>0</FONT>, SRCCOPY);<BR> hbmpDst =
(HBITMAP)SelectObject(hdcDst, (HGDIOBJ)hbmpSrc);<BR> SelectObject(hdcSrc, (HGDIOBJ)hbmpSrc);<BR><BR> DeleteDC(hdcDst);<BR> DeleteDC(hdcSrc);<BR><BR> <B>return</B>(hbmpDst);<BR>}</div><p> __________________________________________________<br>Correo Yahoo!<br>Espacio para todos tus mensajes, antivirus y antispam ¡gratis! <br>¡Abrí tu cuenta ya! - http://correo.yahoo.com.ar