You should use the approach used in the TabbedBars sample application (inherited background painting). It’s possible to the paint background of some window, including a dialog, and the drawn background will be inherited by child windows. First of all, you should invoke the following code to turn the inherited background painting feature on:
g_PaintManager->m_bCustomBackgroundInheritanceEnabled = true;
This code should be invoked both at startup and after selection of a new paint manager. If the inherited background painting feature is turned on, the
CExtPaintManager::g_nMsgPaintInheritedBackground
message is sent to all the windows and allows you to paint a solid background shared between parent/children windows. This message is handled in the TabbedBars sample where you can turn on the a hurricane-like background in the main frame window and a consistent gradient background in dialog windows inserted as pages into a One Note tab page container window.
As for the picture control you can use either the standard MFC’s CStatic class or its Prof-UIS enhanced version
CExtLabel
.
There is also a
CExtImageEditWnd
class that allows you to show and edit bitmap images and/or icons. It includes a set of drawing tools and undo/redo feature support. You can use this control in the read-only mode to have the
CExtImageEditWnd
window as an image viewer only. Just create it with the
__EIEDWS_READONLY
style to disable editing.
As for loading the PNG files there is a
CExtSkinBitmap
class in the ProfSkin library that loads PNG images. So you can use this library or any other you can find over the internet.