4 * This function is placed in separate file because Xpm headers conflict with
7 * Written by Sergey Khorev.
8 * http://iamphet.nm.ru/vim/index.html
11 #ifndef WIN32_LEAN_AND_MEAN
12 # define WIN32_LEAN_AND_MEAN
16 /* reduced def from Vim.h */
18 # if defined(__STDC__) || defined(__GNUC__) || defined(WIN3264)
27 /* Engage Windows support in libXpm */
33 * Tries to load Xpm image from file 'filename'.
35 * success - 0 and image and mask BITMAPS
38 LoadXpmImage(filename
, hImage
, hShape
)
43 XImage
*img
; /* loaded image */
44 XImage
*shp
; /* shapeimage */
47 HDC hdc
= CreateCompatibleDC(NULL
);
50 res
= XpmReadFileToImage(&hdc
, filename
, &img
, &shp
, &attr
);
56 *hImage
= img
->bitmap
;
57 *hShape
= shp
->bitmap
;