void CCywView::Onfd2b() 
{
// TODO: Add your command handler code here
CCywDoc * pDoc = GetDocument();
int i,j,nBmpHeight,nnWidth,nBmpWidth,a,b;
nBmpHeight=pDoc->BmpHeight*2;
nBmpWidth=pDoc->nWidth*2; BYTE *npImage;
npImage=(BYTE*)malloc(sizeof(BYTE)*(nBmpHeight*nBmpWidth));


if (nBmpWidth%4==0)
{
nnWidth=nBmpWidth;
}
else
{
nnWidth=(nBmpWidth+3)/4*4;
}
for (i = 0; i < nBmpHeight; i++)
for(j = 0; j < nBmpWidth; j++)
{
a=(int)i/2;
b=(int)j/2;
npImage[i*nnWidth+j]=pDoc->pImage[a*pDoc->nWidth+b];
}

fangda dlg; dlg.pImage=npImage;
dlg.BmpWidth=nBmpWidth;
dlg.BmpHeight=nBmpHeight;
dlg.pBitMapInfo=pDoc->pBitMapInfo;
dlg.BitMapFileHeader=pDoc->BitMapFileHeader;
dlg.ColorUsed=pDoc->ColorUsed;
dlg.BitCount=pDoc->BitCount;
dlg.nWidth=nnWidth;
    dlg.DoModal(); free(npImage);
 
}