Chapter 12: Dialog-Based Windows Visual C++ and MFC Fundamentals
- Return the MSVC and save everything
10.3 The Mini Frame Window...........................................................................
10.3.1..Introduction..........................................................................................
A mini frame is a window that is mostly used as a floating object that accompany another
window the main object of an application. It appears as a normal frame window we have
seen so far with borders and a client area but a mini frame window is used a tool instead
of as a main window. For this functionality, it does not have the System minimize and
maximize buttons. As a tool window, it appears with a short title bar and is equipped with
a system close button.
10.3.2..Creation of a Miniframe Window.....................................................
The miniframe window is based on the CMiniFrameWnd class. To create a miniframe
window, first declare a variable or a pointer to CMiniFrameWnd. You can define its
class using the AfxRegisterWndClass() function. You can then pass the return value of
that function to its Create() method. The syntax of this method is:
virtual BOOL Create(
LPCTSTR lpClassName,
LPCTSTR lpWindowName,
DWORD dwStyle,
const RECT& rect,
CWnd* pParentWnd = NULL,
UINT nID = 0
);
The lpClassName parameter should be a value returned from the
AfxRegisterWndClass() function.
The lpWindowName is the caption displayed in the title bar of the window.
The dwStyle parameter is the style to apply to the window. Normally, it would use the
regular styles of a normal window but many styles are invalid. For example, whether you