473,412 Members | 2,277 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,412 software developers and data experts.

Doc/View and Split Screen

79
Hello,

I used the Doc/View architecture to create a split screen application. On startup, the screen is already split horizontally. I did the following in the MainFrm class:


Expand|Select|Wrap|Line Numbers
  1. BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT /*lpcs*/,
  2.     CCreateContext* pContext)
  3. {
  4.     if(m_wndSplitter.Create(this,
  5.         2, 2,               // TODO: adjust the number of rows, columns
  6.         CSize(10, 10),      // TODO: adjust the minimum pane size
  7.         pContext))
  8.     {
  9.         PostMessage(WM_APP + 1);
  10.         return TRUE;
  11.     }
  12.     else
  13.         return FALSE;
  14. }
Expand|Select|Wrap|Line Numbers
  1. BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
  2.     ON_WM_CREATE()
  3.     ON_MESSAGE(WM_APP + 1,OnApp1)
  4. END_MESSAGE_MAP()
  5.  
  6. LRESULT CMainFrame::OnApp1(WPARAM, LPARAM)
  7. {
  8.     m_wndSplitter.SplitRow(100);
  9.     return 0;
  10. }
My question is how can i access the different parts of the screen? For example, if I want to put something in the top portion, how would I do that? What is the top portion defined as?


This is the first time I use Doc/View, so I'm not familiar with the higher level stuff.

Thanks
Aug 22 '07 #1
2 2854
Banfa
9,065 Expert Mod 8TB
You will need to create view windows for the 2 halfs of the splitter window which will need to have been derived from CView (although not necessarily directly).

Then call the method m_wndSplitter.CreateView(...)

Then you can call m_wndSplitter.GetPane(...) to get pointers to the classes of the view windows for the 2 halfs of the splitter window.
Aug 22 '07 #2
ahammad
79
How do you do that?

I tried this:
Expand|Select|Wrap|Line Numbers
  1. m_wndSplitter.CreateView(0, 0, RUNTIME_CLASS(CSplitMFCView), CSize(10, 10), pContext);
But it didn't work. CSplitMFCView is my own class that inherits from CView. The file SplitMFCView.h is included in my MainFrm.cpp file.

The error is:

Expand|Select|Wrap|Line Numbers
  1. error C2653: 'CSplitMFCView' : is not a class or namespace name
What am I missing here?

Thanks
Aug 23 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: news.microsoft.com | last post by:
This is a cross post.... My problem is when I am using the split screen editor and I copy and paste from the bottom pane to the top pane, the top pane will reposition itself to where the bottom...
12
by: Neil | last post by:
I previously posted re. this, but thought I'd try again with a summary of facts. I have an Access 2000 MDB with a SQL Server 7 back end. There is a view that is linked to the database via ODBC...
2
by: Maryam | last post by:
Is a split window possible for an MS DOS program and MS Access program?? If so how??? When you run a DOS programn it covers the whole of the PC screen and if you have other applications you...
0
by: Brian Henry | last post by:
Here is another virtual mode example for the .NET 2.0 framework while working with the list view. Since you can not access the items collection of the list view you need to do sorting another...
6
by: wiewel | last post by:
hi all, i have a strange problem when trying to set up a horizontal menubar: i would like to split the whole screen from left to right into 9 pieces. the first one has a fixed width of 186px....
4
by: James L | last post by:
I have a tree view with a root, 3 noodes(1,2,3) each having one sub node. I drill down to a node. I get the path by saying treeView1.selectedNode.fullpath and assign it to a variable. If I...
3
by: Bill Nguyen | last post by:
I'm working on a project that requires outputs to be sent to multiple windows on a single monitor. I have no idea whether .NET can provide this capability. Also, is there any utility/control out...
5
by: cjl | last post by:
Hi. I am trying to screen scrape some stock data from yahoo, so I am trying to use urllib2 to retrieve the html and beautiful soup for the parsing. Maybe (most likely) I am doing something...
7
by: Mike TI | last post by:
Nov 13, 2007 Hi all I have an application that comprises of three modules. Initially a screen is displayed. Upon selection from a menu on this screen, module 1, module 2 or module 3 is...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.