// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CImageEditView)
public:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
virtual void OnInitialUpdate(); // called first time after construct
//}}AFX_VIRTUAL
//
// If a bitmap is loaded, set the view size equal to the bitmap size.
// Otherwise, set the view's width and height to 0.
//
if (pBitmap != NULL) {
DIBSECTION ds;
pBitmap->GetObject (sizeof (DIBSECTION), &ds);
sizeTotal.cx = ds.dsBm.bmWidth;
sizeTotal.cy = ds.dsBm.bmHeight;
string.Format (_T ("\t%d x %d, %d bpp"), ds.dsBm.bmWidth,
ds.dsBm.bmHeight, ds.dsBmih.biBitCount);
}
else {
sizeTotal.cx = sizeTotal.cy = 0;
string.Empty ();
}