J'ai créé (généré) un projet MDI avec des documents à onglets avec VS2008 Pro. Visual Studio génère une application avec la fenêtre Fichier/Classe , la fenêtre des propriétés, la fenêtre de sortie et la première vue Document MDI/ .Fenêtres d'ancrage MFC et point d'ancrage
Je veux contrôler les côtés sur lesquels les fenêtres se connectent. Je pensais que ce a été fait dans BOOL CMainFrame :: CreateDockingWindows(), j'ai changé le CBRS_TOP en CBRS_BOTTOM et CBRS_RIGHT en CBRS_LEFT, mais les fenêtres sortent toujours le même dans la zone client. Cela ne fait aucune différence ce qui est utilisé pour un attribut de style de fenêtre de CBRS_xxxx. Où et comment puis-je contrôler où se trouvent ces fenêtres dans la zone client? J'ai changé alors dans:
BOOL CMainFrame::CreateDockingWindows()
{
BOOL bNameValid;
// Create class view
CString strClassView;
bNameValid = strClassView.LoadString(IDS_CLASS_VIEW);
ASSERT(bNameValid);
if (!m_wndClassView.Create(strClassView, this, CRect(0, 0, 200, 200), TRUE,ID_VIEW_CLASSVIEW, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS |
WS_CLIPCHILDREN | CBRS_LEFT | CBRS_FLOAT_MULTI))
{
TRACE0("Failed to create Class View window\n");
return FALSE; // failed to create
}
// Create file view
CString strFileView;
bNameValid = strFileView.LoadString(IDS_FILE_VIEW);
ASSERT(bNameValid);
if (!m_wndFileView.Create(strFileView, this, CRect(0, 0, 200, 200),TRUE, ID_VIEW_FILEVIEW, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS |
WS_CLIPCHILDREN | CBRS_LEFT| CBRS_FLOAT_MULTI))
{
TRACE0("Failed to create File View window\n");
return FALSE; // failed to create
}
// Create output window
CString strOutputWnd;
bNameValid = strOutputWnd.LoadString(IDS_OUTPUT_WND);
ASSERT(bNameValid);
if (!m_wndOutput.Create(strOutputWnd, this, CRect(0, 0, 100, 100),
TRUE, ID_VIEW_OUTPUTWND, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS |
WS_CLIPCHILDREN | CBRS_BOTTOM | CBRS_FLOAT_MULTI))
{
TRACE0("Failed to create Output window\n");
return FALSE; // failed to create
}
// Create properties window
CString strPropertiesWnd;
bNameValid = strPropertiesWnd.LoadString(IDS_PROPERTIES_WND);
ASSERT(bNameValid);
if (!m_wndProperties.Create(strPropertiesWnd, this, CRect(0, 0, 200, 200), TRUE, ID_VIEW_PROPERTIESWND, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN |CBRS_RIGHT | CBRS_FLOAT_MULTI))
{
TRACE0("Failed to create Properties window\n");
return FALSE; // failed to create
}
SetDockingWindowIcons(theApp.m_bHiColorIcons);
return TRUE;
}
Quelqu'un pourrait-il s'il vous plaît aider à expliquer à moi comment contrôler les côtés où ces fenêtres quai? Merci.