Recycling MainFrame View in an SDI

Hello:

   I have a CFrameWnd that overrides OnCreateClient to create a static 
splitter window with three views.  I now have a need to support 2 different 
formats, 2 rows with the top row having 2 columns or 2 columns with the right 
column having 2 rows.  Therefore, I need to be able to scrap the splitter 
window and force OnCreateClient to be called again (to create a splitter 
window in the correct format)  I need this to occur at run time through a 
menu option.  I have the code written, but I don't know how to successfully 
scrap the original splitter window and create another.  When I do, the window 
stops being painted.  I feel that if I can do this through the framework 
forcing OnCreateClient to be called everything will work.

Thanks,
0
Dan4650 (795)
3/30/2006 3:01:02 PM
vc.mfc 33608 articles. 0 followers. Follow

3 Replies
1063 Views

Similar Articles

[PageSpeed] 48

Dan wrote:
> Hello:
> 
>    I have a CFrameWnd that overrides OnCreateClient to create a static 
> splitter window with three views.  I now have a need to support 2 different 
> formats...

Interesting reconfigurable splitter example here:
http://support.microsoft.com/default.aspx?scid=kb;en-us;199515

-- 
Scott McPhillips [VC++ MVP]

0
Scott
3/30/2006 3:22:34 PM
Dan wrote:

> Hello:
> 
>    I have a CFrameWnd that overrides OnCreateClient to create a static 
> splitter window with three views.  I now have a need to support 2 different 
> formats, 2 rows with the top row having 2 columns or 2 columns with the right 
> column having 2 rows.  Therefore, I need to be able to scrap the splitter 
> window and force OnCreateClient to be called again (to create a splitter 
> window in the correct format)  I need this to occur at run time through a 
> menu option.  I have the code written, but I don't know how to successfully 
> scrap the original splitter window and create another.  When I do, the window 
> stops being painted.  I feel that if I can do this through the framework 
> forcing OnCreateClient to be called everything will work.
> 
> Thanks,

Dan:

Switching between two different splitter windows in a frame, or between 
a splitter window and a plain view, is hardly any different from 
switching between two views in a frame.

The way CSplitterWnd is usually used in MFC is very non-OOP, because the 
frame manipulates the views, which are children of the splitter. It is 
much nicer if you make a derived splitter class that creates its own 
views. Then from the switching perspective you can just treat the 
splitter like a view. This is what I do in my SDI app; I have a plain 
view and a derived splitter with two views (3 views in all).

There are two ways to switch between the children of a frame. One is 
Destroy/Create and the other is Hide/Show. I use the latter, so my three 
views are always alive and attached to the document.

David Wilkinson
0
no-reply8010 (1791)
3/30/2006 3:39:55 PM
Thank you for the article, it helped.

"Scott McPhillips [MVP]" wrote:

> Dan wrote:
> > Hello:
> > 
> >    I have a CFrameWnd that overrides OnCreateClient to create a static 
> > splitter window with three views.  I now have a need to support 2 different 
> > formats...
> 
> Interesting reconfigurable splitter example here:
> http://support.microsoft.com/default.aspx?scid=kb;en-us;199515
> 
> -- 
> Scott McPhillips [VC++ MVP]
> 
> 
0
Dan4650 (795)
4/3/2006 4:17:01 PM
Reply:

Similar Artilces:

Queue Views
I am using CRM 3.0 and want to add the column "regarding" for the task in our queue. How can I customize this view. ...

Difference between screen view and print
Hi - I need to send out a table which contains a lot of text in several fields. The document has to be read on screen by some people, but others will have it printed automatically onto paper. I have used 'wrap text' so that all the text shows in the cells - this works for the print, but when you view it on screen the last line is chopped off. Is there anyway of automatically ensuring that all text can be viewed on screen? Any help would be appreciated Maybe you could add an additional alt-enter to those cells. Sometimes forcing that extra new line within the cell will help...

Add nodes to tree view control
I have built myself a database for tracking my genealogy. I have created a form containing a treeview control to display my family tree. I have the following code in my form's on load event to fill the tree.... Dim DB As DAO.Database Dim rs As DAO.Recordset Dim strKey As String Dim strKey2 As String Dim strKey3 As String Dim strKey4 As String Set DB = CurrentDb Set rs = DB.OpenRecordset( _ "SELECT * " & _ "FROM qrySwitchboard " & _ "ORDER BY qrySwitchboard.BDate, qrySwitchboard.WhoID", d...

I can't view my pictures that I inserted into my brochure
The brochure prints it but I cant view them on screen. The view menu already states that I want to see the pictures. This is frustrating as I cant make changes. Slide the acceleration down on your adapter, control panel, display folder, settings tab, advanced button, troubleshoot tab.. If this solves your issue then you need to update your video (graphics) driver. Go to the manufacturer's web site and look around. -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "resh" <resh@discussions.microsoft.com> wrote in me...

Journal view settings
Hello: I am using Outlook 2002. I'd like to switch the journal from the default horizontal scrolling to a vertical view, and filter empty dates. I've tried to find the settings for that with no luck. It seems that the journal view I want is set automatically on archived journals, because my "archive folders" display it like that without me doing anything. Create a new table view on the Journal folder and set its filter.=20 --=20 Sue Mosher, Outlook MVP Author of Microsoft Outlook Programming - Jumpstart for=20 Administrators, Power Users, and Developers ...

Task Pane button in View menu gone
My little sister somehow deleted the Task Pane option from the View menu in Excel and I can't figure out how to restore it. Any suggestions? Try this Shiv You can reset your menubar to default Right click on the menubar and choose customize Under Toolbars select the worksheet menubar and click on reset on the right -- Regards Ron de Bruin (Win XP Pro SP-1 XL2002 SP-2) www.rondebruin.nl "Shiv" <shiovawn@yahoo.com> wrote in message news:040701c384c2$8466b030$a001280a@phx.gbl... > My little sister somehow deleted the Task Pane option from > the View menu in...

I downloaded Microsoft PowerPoint 2007 but still cannot view any
I started getting a message telling me that PowerPoint cannot read what ever I was trying to open on email, then a window telling me to convert, "Microsoft Activation Wizard", a 25 character product key for Microsoft Standard Edition 2003. I downloaded version 2007 but I still get the same messages and cannot open any PowerPoint messages on my email. I am not computer savvy at all. Can anybody tell me what todo? In article <4DF40E6F-7365-4031-8FC1-F094A331763F@microsoft.com>, Eugomez wrote: > I started getting a message telling me that PowerPoint cannot read w...

KDC error followed by You are not authorized to view this page
My CRM server was reporting KDC errors. I followed the KB article http://support.microsoft.com/?id=215383 to stop the errors. Now I can not get to the CRM web site at all, I am getting "You are not authorized to view this page" when I hit the CRM web page. I can live with the KDC errors so how do I roll back the change I made in KB article 215383? Thanks! Duane N. I have solved this problem. To get myself into thi situation I ran the following from the command prompt: cscript adsutil.vbs set w3svc/NTAuthenticationProviders "Negotiate,NTLM" This prevented any/al...

SDI app: Sending messages to the view
Hi, I have a SDI application with multiple views that are all active, but only one is visable at a time (the others are hidden). There is a thread called that is created and started in the mainframe initialupdate. When the thread has processed a chunk of data, it needs to send a message to all views (so each view can get the data and act on it - not just the active view!) If i send a message to MainFrame using AfxGetApp() ->GetMainWnd() ->PostMessage(..) will all the views get the message? If not, how can i subscribe each view to the message? TIA. >If i send a message to M...

View conversation thread in Outlook?
I am wondering if I can set up my Outlook to give me a feature which is standard with Goldmine email. I realize that GM is a database first and email client 2nd (or later), but I have been able in GM to call up all of an email conversation with a given contact with one or two clicks. Also, with Goldmine the emails are automatically numbered as the replies continue. The numbers, which I'm sure you are all familiar with, are within brackets at the beginning of the subject. This allows the user to keep track of which email came in what order without studying the date and time fields very...

Monthly View Question
This is probably a pretty basic question...but I just can't find the solution. When looking at the monthly view is there a way to show more then 2 events? how many you see is based on the window height. See http://slipstick.me/2wk for a way to increase the height of the grid. -- Diane Poremsky [MVP - Outlook] Outlook Tips: http://www.outlook-tips.net/ Outlook & Exchange Solutions Center: http://www.slipstick.com/ Outlook Tips by email: mailto:dailytips-subscribe-request@lists.outlooktips.net EMO - a weekly newsletter about Outlook and Exchange: mailto:EMO-NEWSLETTE...

change text string view during function procedure
Hi all how can i refresh a screen textbox view during a function procedure. the textbox suppose to be a filter on a query and change depending on the command in the function is it possible to make the refresh,for now there is no change in the textbox ...

Error Message When Executing a View
In Access 2007, when I set up a View to query some fields and then delete some of the fields from the query I get an error message. For example, I set up a View in Access 2007 to return columns X, Y and Z, as shown below: SELECT col_X, col_Y, col_Z FROM dbo.Sales I then successfully executed the query. I then removed columns X and Y from the View so that the query would only return Z as shown below: SELECT col_Z FROM dbo.Sales When I executed the View, I got a Microsoft Access error message that said "Cannot find column 'X'". So, I addedd co...

View rights to ther user's inbox
In exchange 5.5 admin console, how do I give users rights to a user's inbox? I want them to have 'View" rights only. So when a manager goes in Outlook, they can open other user;s folder and choose that other user's inbox. Can this be done at the Exchange level or does it have to be done at the client level? If you have Outlook 2k or Higher, you can go ito Outlook, Under File, select OPEN. then select OPEN OTHER USERS FOLDER but before that you need to go to the other persons Outlook, right click on the INBOX and chose properties. Then click on the tab that says "Perm...

create threaded view
OL 2002 SP3 Win XP HE SP1 Follow-up to: microsoft.public.outlook Hi, How do I create a View that will thread my emails just like in a newsgroup--both received and sent obviously, by topic, and date? What is the best way to do it, using what filters, fields, etc? Thanks. stef <stef.bm_at_hotmail.removethis.com> wrote: > How do I create a View that will thread my emails just like in a > newsgroup--both received and sent obviously, by topic, and date? > What is the best way to do it, using what filters, fields, etc? The closest you can come is to keep all messages in one fold...

Can't view Messages
I cannot view any newsgroup messages in the preview pane. The only way i can view it is to "reply" then i see the message below my reply. I have Win XP Pro, and Outlook 2003. Any help is appreciated. (My outlook / email works fine). -Matt nutshell222@hotmail.com Hi Matt, please use Outlook Express as Newsreader -- Ich habe nichts gemacht, gestern gings noch! Bitte in den Newsgroup antworten damit jeder etwas davon hat. Bravestar@Datenschutzministerium.de "Matt" <nutshell222@hotmail.com> schrieb im Newsbeitrag news:ZqadneKI2qQ5RZvcRVn-uw@warpdrive.net... > ...

Changing the 'view' in the Outlook 'Regarding' box
I have been asked if it is possible to change the width for the 'name' column when setting an email to regard an opportunity. It's a bit narrow at present. I've looked in all the usual places and cannot find anything. Any help much appreciated. Regards Alan ...

Viewing log of mail passing through smtp routing connector in Exchange 2003
Hi , Sorry if this all very basic but have just converted from Groupwise over to Exchange and am looking to monitor / track mail passing through the smtp routing connector going externally . We would be looking for sender /recipients/time/subject etc . Have message tracking turned on with the subject logging enabled as well but the log is virtually unreadable , is that as good as it gets ? Thanks in advance for any help .... Rich If you try and simply open the message tracking log, then yes, it is hard to read :-) Exchange has a Message Tracking Center that will help you track messages....

lock doc so I can make changes but others view only on network
I need to put a publisher doc. on my network at work but need it to be password protected so that others can view but not mack changes. I want to be the only one who can make changes. I will have its own file on the network. It will be a scheduling calender for others to view only. Change the permissions on the file to "read only" for everyone and set them to "full ownership" for the "sharebear" user. Or simply make a PDF of it... sharebear wrote: > I need to put a publisher doc. on my network at work but need it to be > password protected so that ...

Calendar Month view issue
Version: 2008 Operating System: Mac OS X 10.5 (Leopard) Processor: Intel Email Client: Exchange when I view the calendar in month view only some of the days show up with the &quot;more...&quot; button at the bottom and some days do not, even though those days have more entries than show up. However it is not consistent. For instance Jan 1 2010 has far too many entries to fit and when I view the month of Dec. I can see Jan 1 and it has the &quot;more...&quot; button at the bottom of the day. when I view the month of Jan, Jan 1 does not have a &quot;more...&quot;...

Viewing accounts
CRM 4.0 I'm the account admin, how can I view all the accounts assigned to a sales person? I've tried to figure it out but so far haven't been able to find out how. TIA Brian Hi Brian, You may use advanced find feature in CRM to lookup all of the account assigned to a sales person. 1. Click on Advanced Find on the tool bar. 2. Select Account as the entity. 3. Filter on Owner =3D Saleperson Hope this helps. Darren Liu, Microsoft CRM MVP Crowe Horwath http://www.crowecrm.com http://msdynamicscrm-e.blogspot.com/ On Dec 28, 4:21=A0pm, "BrianT" <br...@NOSPAM.com&...

Outlook 2003 Journal display or views issue
I use the Journal to not only track my work on office documents, but also to keep a record of how much time I spend doing things that aren't specifically entered as tasks. For some reason, the "entry type", start, end, and contacts fields don't display in the journal view. The columns are there, but field are blank or have the value none. The values were entered when I made the entry, and if I click on a particular entry, the values displayed on the form for that particular entry are correct, but they don't show up under their column in the journal view, and accordingl...

Modifying View (associated sales)
We would like to modify a view that is not accessible via the CRM System Customization means. The view in question can be found if you open a contact or account, and then click the SALES button from the left side menu. The opportunity tab is the only one at this point I am interested in altering. This may require two different modifications... Does anyone have the address to make these changes similar to the Activity view changes that are available? Thank you in advance, Scott I think you want to modify the opportunities associated view. Go to the system customization manager, and choose t...

Combobox linked to Custom Views
Hello, I have trouble with linking combobox selection to the custom views I've created. Please help! In advance, thank you. I created an ActiveX control combobox and have teh following code: Dim bgCmbox As ComboBox Private Sub ComboBox1_Change() 'With Worksheets(1) Dim bgCmbox As ComboBox bgCmbox.AddItem " ", 1 bgCmbox.AddItem "(All)", 2 bgCmbox.AddItem "A", 3 bgCmbox.AddItem "B", 4 bgCmbox.AddItem "C", 5 bgCmbox.AddItem "D", 6 bgCmbox.AddItem "E", 7 bgCmbox.A...

Form not opening in Datasheet view via the switchboard
I have a form that is to display a table in datasheet view. It works fine when I click it directly i.e. it opens in datasheet view. Unfortunately when I try to open it via the switchboard thru a button it opens the form in form view. Could someone assist I think I might need to write "datasheet" in the event procedure. Thanks! MSA "MSA" <MSA@discussions.microsoft.com> wrote in message news:47FDC06F-A8D5-47E5-8E3E-7787C56838A8@microsoft.com... >I have a form that is to display a table in datasheet view. It works fine > when I click it directly i.e. it open...