Re: CClientDC and TabCtrl ?
The question I have now is, how would repaint the tab form. I've tried
placing an Invalidate() in the DisplayBmps() at a point where you might
place a call to OnPaint(), but this automatically closes the program.
The code below is as far as I have gotten. And the variables are declared
in the class declaration.
This function is called from the main dialog and passes arguments:
void CTab4::DisplayBmps(a few parameters here)
{
"for" loops in here that result
with specfic bitmap and position
*Invalidate() here*
}
void CTab4::OnPaint()
{
CPaintDC dc(this);
if(Crd != NULL)
{
bmp.LoadBitmap(Crd);
bmp.GetBitmap(&BmpInfo);
dcMem.CreateCompatibleDC(&dc);
pOldBmp = dcMem.SelectObject(&bmp);
dc.BitBlt(Xpos, Ypos, BmpInfo.bmWidth,
BmpInfo.bmHeight, &dcMem,
0, 0, SRCCOPY);
dcMem.SelectObject(pOldBmp);
dcMem.DeleteDC();
bmp.DeleteObject();
}
}