|
HDC hdc;
hdc=Form1->Image1->Canvas->Handle;
HDC hMemDC;
HBITMAP hBmp;
COLORREF BC;
BC=RGB(255,0,255);
HBRUSH BrushObject;
BrushObject=CreateSolidBrush(BC);
SelectObject(hMemDC,BrushObject);
hMemDC=CreateCompatibleDC(hdc); //Create a virtual DC
hBmp=CreateCompatibleBitmap(hdc,600,250);// Create bitmap
FillRect(hMemDC,BrushObject); // There is a problem with this sentence
SelectObject(hMemDC,hBmp); // Select the created DC
Polyline(hMemDC,pot,799);
BitBlt(hdc,16,8,600,250,hMemDC,0,0,SRCCOPY); //copy
DeleteDC(hMemDC);
DeleteObject(hBmp);
DeleteObject(BrushObject);
What's wrong with this code? Why can't I draw the waveform?? FillRect(hMemDC,BrushObject); // There is a problem with this sentence Is this fill color?? How can I use it? |
|