Home > Software engineering >  Master, please advice on how to modify the MFC wizard generated under the title
Master, please advice on how to modify the MFC wizard generated under the title

Time:09-17

Use the wizard to generate "class view", "file view" word how to modify, look for half a day can not find,
Please people,

CodePudding user response:

BOOL CMainFrame: : CreateDockingWindows ()
{
BOOL bNameValid;

//create the class view
Cstrings 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 "the view" window \ n ");
Return FALSE;//to create
}

//create a file view
Cstrings 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;//to create
}

//create output window
Cstrings 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;//to create
}

//create a properties window
Cstrings 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;//to create
}

SetDockingWindowIcons (theApp m_bHiColorIcons);
Return TRUE;
}

CodePudding user response:

In the resource string

CodePudding user response:

SetWindowText

CodePudding user response:

Put the string swaps, or unchanged
BOOL CMainFrame: : CreateDockingWindows ()
{
BOOL bNameValid;

//create the class view
Cstrings strClassView;
//bNameValid=strClassView LoadString (IDS_CLASS_VIEW);
BNameValid=strClassView. LoadString ( IDS_FILE_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 "the view" window \ n ");
Return FALSE;//to create
}

//create a file view
Cstrings strFileView;
//bNameValid=strFileView LoadString (IDS_FILE_VIEW);
BNameValid=strFileView. LoadString ( IDS_CLASS_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;//to create
}

CodePudding user response:

Recompile?

CodePudding user response:

New project or unchanged,

CodePudding user response:

How do I test is effective


CodePudding user response:

Found the building Lord, I also want to change here, do not know how

CodePudding user response:


To change yourself,, before starting the program did not modify the best