Hola buenas otra vez...
Tengo una imagen convertida a C file, con gimp, para asi poder incrustar la imagen en el codigo y no este libremente por suelta, y la puedan borrar etc...
Pero no se como convertirla en HBITMAP para usarla...
Código:
/* GIMP header image file format (RGB): C:\Users\shiro\Desktop\Debug.h */
static unsigned int width = 208;
static unsigned int height = 51;
/* Call this macro repeatedly. After each use, the pixel data can be extracted */
#define HEADER_PIXEL(data,pixel) {\
pixel[0] = (((data[0] - 33) << 2) | ((data[1] - 33) >> 4)); \
pixel[1] = ((((data[1] - 33) & 0xF) << 4) | ((data[2] - 33) >> 2)); \
pixel[2] = ((((data[2] - 33) & 0x3) << 6) | ((data[3] - 33))); \
data += 4; \
}
static char *header_data =
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````Z-`-L$IPGR-&GQ]!H\"!$GQ]#G1]#GB%\"G2!!G2!!G2!!G2!!"
"G2!!G2!!G2!!G2!!G2!!G2!!G2!!G2!!G2!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NL+SML+SML+SML+SML+SML+SML+SML+SML+SML+SML+SML+SM"
"L+SML+SML+SML+SML+SML+SML+SML+SML+SML+SML+SML+SML+SML+SML+SML+SM"
"````````````````````````````````````````````````````````````````"
"`````````````````P\\_`````````P\\_``\\``P````X]```^````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"`````P\\_`````````````````````````P\\_````````````````````````````"
"```````````````````^`P`^_``_```^``\\```````X]````````````````````"
"````````````````````````````````````````````````````````````````"
"`````````````````P````TZ`P```P`^``\\]``X_`P```P\\_````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"`````P\\_`````````P\\_````````````````````````````````````````````"
"`````````````````````P```P\\]`````P\\_```````````^````````````````"
"````````````````````````````````````````````````````````````````"
"`````````````````````@`]``\\````^_P````X_```\\``X`````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````"
"````````````````````````````````````````````````````````````````";
He recortado la imagen porque si no, eran muchos caracteres.
La cuestion es, como convertir eso en HBITMAP...
Para luego usar:
SendMessage(button, BM_SETIMAGE, (WPARAM)IMAGE_BITMAP, (LPARAM)hbitmap_image);
Gracias..