在CFormView 中產生CBitmapButtom:
例如要生成一個OPEN和一個SAVE的CBitmapButtom,可按如下方法:
class CMainWindow : public CFrameWnd
{
private:
CBitmapButtom m_OpenButtom;
CBitmapButtom m_SaveButtom;
CBitmapButtom m_SaveButtom;
public:
......
};
int CMainWindow : OnCreate(LPREATESTRUCT)
{
CRect rect;
rect.SetRect(4,4,36.36);
m_OpenButtom.Create(NULL, WS_CHILD | WS_VISIBLE |
BS_OWNERDRAW,
rect, this, IDB_OPEN);
m_OpenBittom.LoadBitmap("OPENU","OPEND");
// m_SaveButtom 如上
。。。。。。。
return 0;
}
......
BEGING_MESSAGE_MAP(CMainWindow, CFromView)
.
......
BEGING_MESSAGE_MAP(CMainWindow, CFromView)
.
ON_BN_CLICKED (IDB_OPEN, OnOpen)
.
.
END_MESSAGE_MAP()
//如果以上方法不行請檢查你的BITMAP 資源,APPSTUDIO中,"OPENU"和
&nbs