Professional UI Solutions
Site Map   /  Register


Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » CMainFrame question Collapse All
Subject Author Date
tera tera Apr 12, 2009 - 8:57 PM


Because I am independent and set a Caption title name.

I do not want to display drawcl1 automatically.

Please teach the method how drwcl1 is not displayed.


Technical Support Apr 20, 2009 - 8:51 AM

This issue is very specific because we have no idea how the MDI interface performs main frame caption changing without sending the WM_SETTEXT message to the main frame window. We can provide you with a temporarily solution applicable to skinned window captions only.

Technical Support Apr 13, 2009 - 1:16 PM

You should remove the FWS_ADDTOTITLE style from the main frame window.

tera tera Apr 14, 2009 - 2:16 AM


This program deletes FWS_ADDTOTITLE.

However, it is displayed by a title.

Technical Support Apr 14, 2009 - 11:40 AM

The &= ~(FWS_ADDTOTITLE); line of code must be present both in the CMuChildFrame::PreCreateWindow() and CMainFrame::PreCreateWindow() methods:

BOOL CMuChildFrame::PreCreateWindow(CREATESTRUCT& cs)
            if( ! CExtNCW < CMDIChildWnd > :: PreCreateWindow( cs ) )
                        return FALSE;
            cs.dwExStyle &= ~WS_EX_CLIENTEDGE;
            cs.lpszClass = AfxRegisterWndClass(0);
            return TRUE;

BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
            if( ! CExtNCW < CMDIFrameWnd > :: PreCreateWindow( cs ) )
                        return FALSE;
            return TRUE;

tera tera Apr 14, 2009 - 7:06 PM



With pChildFrame->SetWindowText( "test-title" ) , the  string was displayed by MdiTab.

However, it is displayed in title.

I do not want to display it in title.


///////////////////////////////////////////////////////////////////////////// // // String Table //


--------------------------------------------------- .cpp

 CMainFrame * pMainFrame =   DYNAMIC_DOWNCAST(    CMainFrame,    ::AfxGetMainWnd()    );

 pChildFrame->SetWindowText( "test-title" );




Technical Support Apr 16, 2009 - 1:53 PM

The main frame’s window text becomes changed without sending the WM_SETTEXT message to the window procedure. So, you need some other solution of this issue. For instance, if you are keeping the MDI child frame windows constantly maximized, then you can switch to SDI project type with the tab page container control inside.

tera tera Apr 16, 2009 - 6:19 PM


I use plural CMDIFrameWnd.

I cannot use SDI.

In my application with SetWindowText , I renew Caption.

but , Behind caption, "test-title" is displayed.

This is troubled.

Please teach some good method

tera tera Apr 19, 2009 - 10:35 PM


Is not there the good idea elsewhere anymore?

Is it difficult for you to advise me?