Link to home
Start Free TrialLog in
Avatar of engllf
engllf

asked on

Bitmap as background of a CMiniFrame

How do I load a huge bitmap to be the background of a CMiniFrame?
Below is the code i used to create the miniframe.  

int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
...etc..

CString strClass = AfxRegisterWndClass(CS_VREDRAW|CS_HREDRAW,::LoadCursor(NULL, IDC_ARROW),(HBRUSH)::GetStockObject(WHITE_BRUSH),::LoadIcon(NULL,IDI_APPLICATION));

CRuntimeClass * pRuntimeClass = RUNTIME_CLASS(CMyMiniFrame);
MyMiniFrame = (CMyMiniFrame*)pRuntimeClass->CreateObject();
MyMiniFrame->Create(strClass,_T("My MiniFrame Window"), MFS_MOVEFRAME, CRect(50,50,200,130));
}
Avatar of engllf
engllf

ASKER

Edited text of question
ASKER CERTIFIED SOLUTION
Avatar of Tommy Hui
Tommy Hui

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of engllf

ASKER

Do you have any sample code for OnPaint{},OnEraseBkgnd()?
I tried to write them but i simply get no where.
Thanks