-
- /* allocate gdi object*/
- hbitmap = (MWBITMAPOBJ *)GdItemAlloc(sizeof(MWBITMAPOBJ)-1+size);
- if(!hbitmap)
- return NULL;
- hbitmap->hdr.type = OBJ_BITMAP;
- hbitmap->hdr.stockobj = FALSE;
- hbitmap->width = nWidth;
- hbitmap->height = nHeight;
-
- /* create with specified parameters */
- hbitmap->planes = nPlanes;
- hbitmap->bpp = bPP;
- hbitmap->linelen = linelen;
- hbitmap->size = size;
-
- /* TODO: copy data */
-
- return (HBRUSH)hbitmap;
+ return NULL;
+ }
+ ReleaseDC(NULL, hScreenDC);
+
+ /* allocate gdi object*/
+ hbitmap = (MWBITMAPOBJ *)GdItemAlloc(sizeof(MWBITMAPOBJ)-1+size);
+ if(!hbitmap)
+ return NULL;
+ hbitmap->hdr.type = OBJ_BITMAP;
+ hbitmap->hdr.stockobj = FALSE;
+ hbitmap->width = nWidth;
+ hbitmap->height = nHeight;
+
+ /* create with specified parameters */
+ hbitmap->planes = nPlanes;
+ hbitmap->bpp = bPP;
+ hbitmap->linelen = linelen;
+ hbitmap->size = size;
+
+ /* TODO: copy data */
+
+ return (HBRUSH)hbitmap;