this is the block of code that renders the image then pastes it to screen. attached is the full source for the win.h as it stands at the moment
void DrawGUI(void)
{
for(int i=0;i < (int)gWins.size();i++)
{
int tH; //temp hight and width
switch (gWins[i].wMinimized)
{
case 0:
dbCreateBitmap(999,gWins[i].wWidth, gWins[i].wHeight); //Create a bitmap the size of the windows
tH = gWins[i].wHeight;
break;
case 1:
dbCreateBitmap(999,gWins[i].wWidth, 20); //Create a bitmap the size of the windows
tH = 20;
break;
}
dbSetCurrentBitmap(999); //Set it to current bitmap so we can draw to it
wSetColor(winBGCOL[0],winBGCOL[1],winBGCOL[2],0); //set the ink colour to window background
switch (gWins[i].wMinimized)
{
case 0:
dbBox(0,0,gWins[i].wWidth,gWins[i].wHeight); //Draw a box to fill the windows
wSetColor(255,255,255,0); //set the ink to white
dbLine(0,21,0,gWins[i].wHeight+21); //Draw highlights
dbLine(0,21,gWins[i].wWidth,21); //draw the highlights
wSetColor(0,0,0,0); //set ink to black
dbLine(0,20,gWins[i].wWidth,20);//Draw a seperator between title and window
break;
}
wSetColor(winTCOL[0],winTCOL[1],winTCOL[2],0); //Set color to taskbar color
dbBox(0,0,gWins[i].wWidth,19); //Draw Title bar
wSetColor(winTGCOL[0],winTGCOL[1],winTGCOL[2],0); //Set color to taskbar color
dbLine(0,0,gWins[i].wWidth,0); //Draw title highlight
dbLine(0,0,0,19); //draw title highlight
dbText(2,2,gWins[i].wCaption); //Print Caption on title bar
dbGetImage(999,0,0,gWins[i].wWidth-1,tH); //copy the image into memory
dbSetCurrentBitmap(0); //set active bitmap to the screen
dbPasteImage(999,gWins[i].wX ,gWins[i].wY); //Paste the image to screen
dbDeleteBitmap(999); //delete the image
}
}
If i dont know,
I'm sure you will