CStatusBar problem
Mads_G._Houmann@olicom.dk
Monday, April 15, 1996
VC++ 4.0 / MSDN / Win95:
I have a problem with the CStatusBar. I can't get it to use a 3D-look
border, that "interfaces" with my framewindow border.
I have created a skeleton SDI app. using AppWizard, but since I don't want
an Doc-View application I have replaced the standard AppWizard window
creation:
CSingleDocTemplate* pDocTemplate;
pDocTemplate = new CSingleDocTemplate(
IDR_MAINFRAME,
RUNTIME_CLASS(CATMSwMgVDoc),
RUNTIME_CLASS(CMainWindow), // main SDI frame window
RUNTIME_CLASS(CATMSwMgVView));
AddDocTemplate(pDocTemplate);
in my CMyWinApp::InitInstance() with a LoadFrame call:
CMainWindow *pMainFrame = new CMainWindow();
if ( !pMainFrame->LoadFrame( IDR_MAINFRAME,
WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE ) )
return FALSE;
m_pMainWnd = (CWnd*) pMainFrame;
pMainFrame->ShowWindow( m_nCmdShow );
pMainFrame->UpdateWindow();
When I use the DocTemplate code the stausbar gets the normal 3D look, but
when I use my own code it is flat with no border. The CStatusBar is created
in CMyFrameWnd::OnCreate() and is a member variable. The StatusBar creation
code is the same for the two examples.
--
Mads Houmann [mgh@olicom.dk]
Software Engineer
Olicom A/S Denmark
Mads_G._Houmann@olicom.dk
Monday, April 22, 1996
VC++ 4.0 / MSDN / Win95:
I have a problem with the CStatusBar. I can't get it to use a 3D-look
border, that "interfaces" with my framewindow border.
I have created a skeleton SDI app. using AppWizard, but since I don't want
an Doc-View application I have replaced the standard AppWizard window
creation:
CSingleDocTemplate* pDocTemplate;
pDocTemplate = new CSingleDocTemplate(
IDR_MAINFRAME,
RUNTIME_CLASS(CATMSwMgVDoc),
RUNTIME_CLASS(CMainWindow), // main SDI frame window
RUNTIME_CLASS(CATMSwMgVView));
AddDocTemplate(pDocTemplate);
in my CMyWinApp::InitInstance() with a LoadFrame call:
CMainWindow *pMainFrame = new CMainWindow();
if ( !pMainFrame->LoadFrame( IDR_MAINFRAME,
WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE ) )
return FALSE;
m_pMainWnd = (CWnd*) pMainFrame;
pMainFrame->ShowWindow( m_nCmdShow );
pMainFrame->UpdateWindow();
When I use the DocTemplate code the stausbar gets the normal 3D look, but
when I use my own code it is flat with no border. The CStatusBar is created
in CMyFrameWnd::OnCreate() and is a member variable. The StatusBar creation
code is the same for the two examples.
--
Mads Houmann [mgh@olicom.dk]
Software Engineer
Olicom A/S Denmark
Don.Irvine@net-tel.co.uk
Wednesday, April 24, 1996
> When I use the DocTemplate code the stausbar gets the normal 3D look, but
> when I use my own code it is flat with no border. The CStatusBar is created
> in CMyFrameWnd::OnCreate() and is a member variable. The StatusBar creation
> code is the same for the two examples.
This is all caused by the WS_EX_CLIENTEDGE extended style. You need to remove
it from the frame window and add it to the view [this is what the doc/view
SDI code would have done for you ... look at CFrameWnd::CreateView].
Don
| Вернуться в корень Архива
|