Bitmap in a MDI
-
Hi Forum, I would like to set a bitmap (sign of firm) in the frame of the mainframe of a mdi-document! normaly its windows-default gray. Have somebody a solution? Thanks!
-
Hi Forum, I would like to set a bitmap (sign of firm) in the frame of the mainframe of a mdi-document! normaly its windows-default gray. Have somebody a solution? Thanks!
Here's the solution from The MFC Answer Book by Eugène Kain:
- Create a new CWnd-derived class (we'll call it CMdiBackground). This will be used to subclass the MDI client window.
- Add handlers to this class for WM_ERASEBKGND and WM_SIZE.
- In OnEraseBkgnd, call CWnd::OnEraseBkgnd() and then do whatever custom painting you want.
- Your OnSize() handler should call CWnd::OnSize(), followed by Invalidate(TRUE).
- Add a CMdiBackground member variable (call it m_wndMdiBackground) to your CMainFrame class.
- Add this code to the end of CMainFrame::OnCreate() if ( !m_wndMdiBackground.SubclassWindow(m_hWndMDIClient)) { return -1; }
--Mike-- ================== The original message was: Hi Forum,
I would like to set a bitmap (sign of firm) in the frame of the mainframe of a mdi-document! normaly its windows-default gray.
Have somebody a solution?Thanks!
-
Hi Forum, I would like to set a bitmap (sign of firm) in the frame of the mainframe of a mdi-document! normaly its windows-default gray. Have somebody a solution? Thanks!
Hello, My codes at the following does this and more!!! http://www.codeproject.com/docview/mditab.asp Regards, Paul.