Adding a splitter window without using the wizard 
Author Message
 Adding a splitter window without using the wizard

I need to add a static splitter window to a program that is already in
place.

I added a CSplitterWnd to the MainFrame and an OnCreateClient function.

In OnCreateClient I CreateStatic the window and then do two CreateViews
but nothing comes up on the screen.

I went back to the beginning and created two projects - one with and one
without
splitter windows and the only differences that I could find were in the
CSplitterWnd
variable, the OnCreateClient, and in the .RC file where there is the Split
menu item
and a couple of extra strings.

Any ideas?

Thanks in advance.

Dave Huff



Mon, 24 Sep 2001 03:00:00 GMT  
 Adding a splitter window without using the wizard
Dave:

Check to see if OnInitialUpdate() is getting called for both views. If so,
check that the OnDraw() is getting called for both views.

Or did you mean that even the main window does not appear? Maybe you should
show us your OnCreateClient().

HTH,

David Wilkinson

===================

Quote:

> I need to add a static splitter window to a program that is already in
> place.

> I added a CSplitterWnd to the MainFrame and an OnCreateClient function.

> In OnCreateClient I CreateStatic the window and then do two CreateViews
> but nothing comes up on the screen.

> I went back to the beginning and created two projects - one with and one
> without
> splitter windows and the only differences that I could find were in the
> CSplitterWnd
> variable, the OnCreateClient, and in the .RC file where there is the Split
> menu item
> and a couple of extra strings.

> Any ideas?

> Thanks in advance.

> Dave Huff



Wed, 26 Sep 2001 03:00:00 GMT  
 Adding a splitter window without using the wizard

Quote:

>Check to see if OnInitialUpdate() is getting called for both views.

It is

Quote:
>If so,check that the OnDraw() is getting called for both views.

It is.

Quote:

>Or did you mean that even the main window does not appear? Maybe you should
>show us your OnCreateClient().

Main window appears but there is no splitter window and no way to make one
appear.

These are the additions to my CMainFrame header

public:
  CSplitterWnd m_wndSplitter;

This is the code from my OnCreateClient call

{
  BOOL ret;
 ret = m_wndSplitter.CreateStatic( this, 2, 1, WS_CHILD | WS_VISIBLE);

  if (ret)
    ret = m_wndSplitter.CreateView(0, 0,
RUNTIME_CLASS(CKodiakSplitView),CSize(0, 300), pContext);

  if (ret)
    ret = m_wndSplitter.CreateView(1, 0,
RUNTIME_CLASS(VehicleFormView),CSize(210, 210), pContext);

  if (ret)
    m_wndSplitter.SetRowInfo(1, 240, 240);

Quote:
}



Fri, 28 Sep 2001 03:00:00 GMT  
 Adding a splitter window without using the wizard
Dave:

You have set the width of the upper pane to be zero. Did you mean to do that? I
would certainly set the width to some non-zero value to see if that is the
problem.

David

===========

Quote:


> >Check to see if OnInitialUpdate() is getting called for both views.

> It is

> >If so,check that the OnDraw() is getting called for both views.

> It is.

> >Or did you mean that even the main window does not appear? Maybe you should
> >show us your OnCreateClient().

> Main window appears but there is no splitter window and no way to make one
> appear.

> These are the additions to my CMainFrame header

> public:
>   CSplitterWnd m_wndSplitter;

> This is the code from my OnCreateClient call

> {
>   BOOL ret;
>  ret = m_wndSplitter.CreateStatic( this, 2, 1, WS_CHILD | WS_VISIBLE);

>   if (ret)
>     ret = m_wndSplitter.CreateView(0, 0,
> RUNTIME_CLASS(CKodiakSplitView),CSize(0, 300), pContext);

>   if (ret)
>     ret = m_wndSplitter.CreateView(1, 0,
> RUNTIME_CLASS(VehicleFormView),CSize(210, 210), pContext);

>   if (ret)
>     m_wndSplitter.SetRowInfo(1, 240, 240);
> }



Sat, 29 Sep 2001 03:00:00 GMT  
 Adding a splitter window without using the wizard
Thanks for the help.  In actual fact I found the problem on my own
Actually I found what I was doing wrong was that my OnCreateClient was
calling the default OnCreateClient further below the window creation.

Thanks for your help.



Sat, 29 Sep 2001 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Adding a splitter window effect to a docked window

2. Using ATL without wizards

3. How to use ADO without using Wizard

4. splitter window without MFC

5. Handling Events without using Class Wizard

6. how to use splitter window without the split line

7. Book for MFC without using App Wizards

8. multiple views inside a frame window without splitters

9. Splitter window without frames.

10. Splitter Window without split-bar

11. how to use splitter window without the split line

12. multiple views inside a frame window without splitter

 

 
Powered by phpBB® Forum Software