473,657 Members | 2,504 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Doc/View and Split Screen

79 New Member
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 2867
Banfa
9,065 Recognized Expert Moderator Expert
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.C reateView(...)

Then you can call m_wndSplitter.G etPane(...) to get pointers to the classes of the view windows for the 2 halfs of the splitter window.
Aug 22 '07 #2
ahammad
79 New Member
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
400
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 pane is pointed to and I loose my place in the upper pane. Has anyone experiences this, and is there a setting somewhere to change this behavior? Thanks.
12
2631
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 and has been in place for several years without any performance problems. Recently I added a couple of fields to the output of the view, and it became very slow when scrolling. When just opened in the database window, the linked view takes about...
2
1895
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 cannot see them in the task bar and you have to alt-tab to flick through them.
0
3232
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 way... here is my code on how I did it to help anyone starting out get an idea of how to use virtual mode in ..NET 2.0 Imports CrystalDecisions.CrystalReports.Engine Imports CrystalDecisions.Shared
6
9896
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. the remaining 8 should all have the same width, depending on the screen resolution. how can i get this to work in both IE and mozilla? i already have a solution that works fine in mozilla, but does not in IE.
4
11962
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 redraw the tree, or close it up and want to expand the same node again, can i do this via the path?
3
8494
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 there that can do this? My project involves getting gps coordinates from an SQLserver table, update the breadcrumb (a series of pushpins) with latest gps data and send the map of each truck to one of the wondows on a split screen monitor. Any...
5
3748
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 wrong, but when I use urllib2.urlopen to fetch a page, and when I view 'page source' of the exact same URL in firefox, I am seeing slight differences in the raw html.
7
1140
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 invoked. Please note here that some variables defined as public in the initial screen are used by the modules.
0
8823
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8726
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8603
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7320
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6163
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4151
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1604
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.