Another C to Delphi.
From: Julian Maisano (maisanosys_at_yahoo.com)
Date: 12/30/03
- Next message: George K.: "Always ANSI_CHARSET"
- Previous message: Mike Williams (TeamB): "Re: Is Action := caFree enough?"
- Next in thread: Ignacio Vazquez: "Re: Another C to Delphi."
- Reply: Ignacio Vazquez: "Re: Another C to Delphi."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 29 Dec 2003 23:05:57 -0600
Again me!
If anybody can, I need help with the {????????} lines
{ // create bitmap to draw spectrum in - 8 bit for easy updating :)
BYTE data[2000]={0}; {????????}
BITMAPINFOHEADER *bh=(BITMAPINFOHEADER*)data; {????????}
RGBQUAD *pal=(RGBQUAD*)(data+sizeof(*bh)); {????????}
int a;
bh->biSize=sizeof(*bh); {????????}
bh->biWidth=SPECWIDTH;
bh->biHeight=SPECHEIGHT; // upside down (line 0=bottom)
bh->biPlanes=1;
bh->biBitCount=8;
bh->biClrUsed=bh->biClrImportant=256;
// setup palette
for (a=1;a<128;a++) {
pal[a].rgbGreen=255-2*a;
pal[a].rgbRed=2*a;
}
for (a=0;a<32;a++) {
pal[128+a].rgbBlue=8*a;
pal[128+32+a].rgbBlue=255;
pal[128+32+a].rgbRed=8*a;
pal[128+64+a].rgbRed=255;
pal[128+64+a].rgbBlue=8*(31-a);
pal[128+64+a].rgbGreen=8*a;
pal[128+96+a].rgbRed=255;
pal[128+96+a].rgbGreen=255;
pal[128+96+a].rgbBlue=8*a;
}
// create the bitmap
specbmp=CreateDIBSection(0,(BITMAPINFO*)bh,DIB_RGB_COLORS,&specbuf,NULL,0);
{????????}
specdc=CreateCompatibleDC(0);
SelectObject(specdc,specbmp);
}
- Next message: George K.: "Always ANSI_CHARSET"
- Previous message: Mike Williams (TeamB): "Re: Is Action := caFree enough?"
- Next in thread: Ignacio Vazquez: "Re: Another C to Delphi."
- Reply: Ignacio Vazquez: "Re: Another C to Delphi."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]