Diff for /np2/win9xc/dialog/dialogs.cpp between versions 1.1 and 1.2

version 1.1, 2003/10/16 17:59:29 version 1.2, 2003/11/21 06:51:15
Line 1 Line 1
 #include        "compiler.h"  #include        "compiler.h"
 #include        "strres.h"  #include        "strres.h"
   #include        "bmpdata.h"
 #include        "dosio.h"  #include        "dosio.h"
 #include        "commng.h"  #include        "commng.h"
 #include        "sysmng.h"  #include        "sysmng.h"
Line 150  void dlgs_setlistuint32(HWND hWnd, WORD  Line 151  void dlgs_setlistuint32(HWND hWnd, WORD 
   
 // ---- draw  // ---- draw
   
 void dlgs_linex(BYTE *image, int x, int y, int l, int align, BYTE c) {  void dlgs_drawbmp(HDC hdc, BYTE *bmp) {
   
         image -= y * align;          BMPFILE         *bf;
         while(l--) {          BMPINFO         *bi;
                 if (x & 1) {          BMPDATA         inf;
                         image[x/2] &= 0xf0;          HBITMAP         hbmp;
                         image[x/2] |= c;          BYTE            *image;
                 }          HDC                     hmdc;
                 else {  
                         image[x/2] &= 0x0f;          if (bmp == NULL) {
                         image[x/2] |= (c << 4);                  return;
                 }          }
                 x++;          bf = (BMPFILE *)bmp;
         }          bi = (BMPINFO *)(bf + 1);
 }          if (bmpdata_getinfo(bi, &inf) != SUCCESS) {
                   goto dsdb_err1;
 void dlgs_liney(BYTE *image, int x, int y, int l, int align, BYTE c) {          }
           hbmp = CreateDIBSection(hdc, (BITMAPINFO *)bi, DIB_RGB_COLORS,
         image += (x / 2) - y * align;                                                                                                  (void **)&image, NULL, 0);
         if (x & 1) {          if (hbmp == NULL) {
                 while(l--) {                  goto dsdb_err1;
                         *image &= 0xf0;          }
                         *image |= c;          CopyMemory(image, bmp + (LOADINTELDWORD(bf->bfOffBits)),
                         image -= align;                                                                                                          bmpdata_getdatasize(bi));
                 }          hmdc = CreateCompatibleDC(hdc);
         }          SelectObject(hmdc, hbmp);
         else {          if (inf.height < 0) {
                 c <<= 4;                  inf.height *= -1;
                 while(l--) {          }
                         *image &= 0x0f;          BitBlt(hdc, 0, 0, inf.width, inf.height, hmdc, 0, 0, SRCCOPY);
                         *image |= c;          DeleteDC(hmdc);
                         image -= align;          DeleteObject(hbmp);
                 }  
         }  
 }  
   
   dsdb_err1:
 // ---- jumper          _MFREE(bmp);
   
 void dlgs_setjumperx(BYTE *image, int x, int y, int align) {  
   
         int             i;  
   
         x *= 9;  
         y *= 9;  
         for (i=0; i<2; i++) {  
                 dlgs_linex(image, x, y+0+i, 19, align, 0);  
                 dlgs_linex(image, x, y+8+i, 19, align, 0);  
                 dlgs_liney(image, x+ 0+i, y, 9, align, 0);  
                 dlgs_liney(image, x+17+i, y, 9, align, 0);  
         }  
 }  
   
 void dlgs_setjumpery(BYTE *image, int x, int y, int align) {  
   
         int             i;  
   
         x *= 9;  
         y *= 9;  
         for (i=0; i<2; i++) {  
                 dlgs_linex(image, x, y+ 0+i, 9, align, 0);  
                 dlgs_linex(image, x, y+17+i, 9, align, 0);  
                 dlgs_liney(image, x+0+i, y, 19, align, 0);  
                 dlgs_liney(image, x+8+i, y, 19, align, 0);  
         }  
 }  }
   

Removed from v.1.1  
changed lines
  Added in v.1.2


RetroPC.NET-CVS <cvs@retropc.net>