| title | CPaneDialog Class | Microsoft Docs | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ms.custom | ||||||||||||||
| ms.date | 11/04/2016 | |||||||||||||
| ms.reviewer | ||||||||||||||
| ms.suite | ||||||||||||||
| ms.technology |
|
|||||||||||||
| ms.tgt_pltfrm | ||||||||||||||
| ms.topic | reference | |||||||||||||
| f1_keywords |
|
|||||||||||||
| dev_langs |
|
|||||||||||||
| helpviewer_keywords |
|
|||||||||||||
| ms.assetid | 48a6bb91-4b92-40f5-8907-b3270b146cf6 | |||||||||||||
| caps.latest.revision | 27 | |||||||||||||
| author | mikeblome | |||||||||||||
| ms.author | mblome | |||||||||||||
| manager | ghogen | |||||||||||||
| translation.priority.ht |
|
The CPaneDialog class supports a modeless, dockable dialog box.
class CPaneDialog : public CDockablePane
| Name | Description |
|---|---|
CPaneDialog::CPaneDialog |
Default constructor. |
CPaneDialog::~CPaneDialog |
Destructor. |
| Name | Description |
|---|---|
| CPaneDialog::Create | Creates a dockable dialog box and attaches it to a CPaneDialog object. |
CPaneDialog::CreateObject |
Used by the framework to create a dynamic instance of this class type. |
CPaneDialog::GetThisClass |
Used by the framework to obtain a pointer to the CRuntimeClass object that is associated with this class type. |
| CPaneDialog::HandleInitDialog | Handles the WM_INITDIALOG message. (Redefines CBasePane::HandleInitDialog.) |
CPaneDialog::OnEraseBkgnd |
Handles the WM_ERASEBKGND message. (Redefines CWnd::OnEraseBkgnd.) |
CPaneDialog::OnLButtonDblClk |
Handles the WM_LBUTTONDBLCLK message. (Redefines CWnd::OnLButtonDblClk.) |
CPaneDialog::OnLButtonDown |
Handles the WM_LBUTTONDOWN message. (Redefines CWnd::OnLButtonDown.) |
CPaneDialog::OnUpdateCmdUI |
Called by the framework to update the dialog box window. (Overrides CDockablePane::OnUpdateCmdUI.) |
CPaneDialog::OnWindowPosChanging |
Handles the WM_WINDOWPOSCHANGING message. (Redefines CWnd::OnWindowPosChanging.) |
| CPaneDialog::SetOccDialogInfo | Specifies the template for a dialog box that is an OLE control container. |
Construct a CPaneDialog object in two steps. First, construct the object in your code. Second, call CPaneDialog::Create. You must specify a valid resource template name or template ID and pass a pointer to the parent window. Otherwise, the creation process fails. The dialog box must specify the WS_CHILD and WS_VISIBLE style. We recommend that you also specify the WS_CLIPCHILDREN and WS_CLIPSIBLINGS styles. For more information, see Window Styles.
Header: afxpanedialog.h
Creates a docking dialog box and attaches it to a CPaneDialog object.
BOOL Create(
LPCTSTR lpszWindowName,
CWnd* pParentWnd,
BOOL bHasGripper,
LPCTSTR lpszTemplateName,
UINT nStyle,
UINT nID,
DWORD dwTabbedStyle= AFX_CBRS_REGULAR_TABS,
DWORD dwControlBarStyle=AFX_DEFAULT_DOCKING_PANE_STYLE);
BOOL Create(
LPCTSTR lpszWindowName,
CWnd* pParentWnd,
BOOL bHasGripper,
UINT nIDTemplate,
UINT nStyle,
UINT nID);
BOOL Create(
CWnd* pParentWnd,
LPCTSTR lpszTemplateName,
UINT nStyle,
UINT nID);
BOOL Create(
CWnd* pParentWnd,
UINT nIDTemplate,
UINT nStyle,
UINT nID);
[in] lpszWindowName
The name of the docking dialog box.
[in] pParentWnd
Points to the parent window.
[in] bHasGripper
TRUE to create the docking dialog box with a caption (gripper); otherwise, FALSE.
[in] lpszTemplateName
The name of the resource dialog template.
[in] nStyle
The Windows style.
[in] nID
The control ID.
[in] nIDTemplate
The resource ID of the dialog template.
[in] dwTabbedStyle
The style of the tabbed window that results when the user drags another control pane onto the caption of this control pane. The default value is AFX_CBRS_REGULAR_TABS. For more information, see the Remarks section of the CBasePane::CreateEx method.
[in] dwControlBarStyle
Additional style attributes. The default value is AFX_DEFAULT_DOCKING_PANE_STYLE. For more information, see the Remarks section of the CBasePane::CreateEx method.
TRUE if this method succeeds; otherwise, FALSE.
The following example demonstrates how to use the Create method in the CPaneDialog class. This example is part of the Set Pane Size sample.
[!code-cppNVC_MFC_SetPaneSize#2]
[!code-cppNVC_MFC_SetPaneSize#3]
Handles the WM_INITDIALOG message.
afx_msg LRESULT HandleInitDialog(
WPARAM wParam,
LPARAM lParam);
[in] wParam
Handle to the control that is to receive the default keyboard focus.
[in] lParam
Specifies additional initialization data.
TRUE if this method is successful; otherwise, FALSE. In addition, TRUE sets the keyboard focus to the control specified by the wParam parameter; FALSE prevents setting the default keyboard focus.
The framework uses this method to initialize controls and the appearance of a dialog box. The framework calls this method before it displays the dialog box.
Specifies the template for a dialog box that is an OLE control container.
virtual BOOL SetOccDialogInfo(_AFX_OCC_DIALOG_INFO* pOccDialogInfo);
[in] pOccDialogInfo
Pointer to a dialog box template that is used to create the dialog box object. The value of this parameter is subsequently passed into the COccManager::CreateDlgControls method.
Always TRUE.
This method supports the COccManager class, which manages OLE control sites and ActiveX controls. The _AFX_OCC_DIALOG_INFO structure is defined in the afxocc.h header file.