I want to display a bitmap on the background of the mainframe in an MDI application.
Could somebody help me...
Printable View
I want to display a bitmap on the background of the mainframe in an MDI application.
Could somebody help me...
Subclass the CMDIClient member in CMainframe::OnCreateClient like this:
BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
if (CMDIFrameWnd::OnCreateClient(lpcs, pContext))
{
m_wndMdiClient.SubclassWindow(m_hWndMDIClient);
m_wndMdiClient.SetBitmap(IDB_MDI_BGND);
return TRUE;
}
else
return FALSE;
}
In this code m_wndMDIClient is a CWnd derived class (CMyMDIClient) which implemets the drawing of the background in CMyMDIClient::OnEraseBkgnd(). Here you can put your code to color the background or to display a bitmap.
Hope this helps
Thanks itb worked.
How we can change the position of the bitmap ?
Thanks in advance ;)
Nico
Could somebody help me... ???