Using Split Window with CDHtmlDialog

Hello, I'm just curious if anyone has tackled this issue in the past.
I have a split window application that is working fine with regular
form dialogs.  But there are a couple views that I 'would have' liked
(although I'm about to give up) to have been HTML based, so I add an
IDD_FORMVIEW dialog, then used the MFC Wizard to add a class with base
class CDHtmlDialog, instead of CFormView class like my other dialogs.

I'm still trying to become familiar with basic C++ concepts here, so
excuse my ignorance, but what happens at this point is that the Window
does't get filled in when selected and I get a couple errors including
"Warning: creating a pane with no document" in the output window when
trying to select the HTML view, and assertion errors when selecting
another view.

Of all the code I could show I'm hoping that this routine for switching
to the HTML view would be the most informative.  Maybe there is just
something I need to change to indicate this is a CDHtmlDialog based
class instead of a CFormView based class:


void CMainFrame::OnSwitchView4()
{
	TRACE("\n\nTrying to switch to view 4.\n\n");
	CRect cr;
	GetClientRect(&cr);
	CSize paneSize1(3*cr.Width()/4, cr.Height());
	CCreateContext Context;
	Context.m_pNewViewClass=RUNTIME_CLASS(SubForm4);
	Context.m_pCurrentDoc=((CpnetApp*)AfxGetApp())->m_pDoc;
	Context.m_pCurrentFrame=this;
	//Context.m_pNewDocTemplate=Context.m_pCurrentDoc->GetDocTemplate();
	Context.m_pLastView=(CView*)m_wndSplitter.GetPane(0,0);
	m_wndSplitter.DeleteView(0, 1);
	m_wndSplitter.CreateView(0, 1,RUNTIME_CLASS(SubForm4),paneSize1,
&Context);
	SubForm4 *pView=(SubForm4*)m_wndSplitter.GetPane(0,1);
	pView->GetParentFrame()->RecalcLayout();
	m_wndSplitter.RecalcLayout();
	//pView->OnInitialUpdate();
	m_wndSplitter.SetActivePane(0,1);	
}


Thank you,
David

0
9/29/2005 7:12:10 PM
vc.mfc 33608 articles. 0 followers. Follow

1 Replies
629 Views

Similar Articles

[PageSpeed] 14

I forgot to add, alternatively, is there an item I can add to the
toolbox (object, class, or compenent) that will allow me to add an HTML
view on top of a CFormView based dialog?

0
9/29/2005 7:21:41 PM
Reply:

Similar Artilces:

Adding custom pages to Windows Control Panel using MFC
Hi, Is there anybody know how to add a custom page to Windows Control Panel using MFC? I found some code on Internet but that was written in Win32 API. Also tried to find the material on MSDN but the content is pretty old (if I am correct) : http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dnarvc/html/msdn_ntcplapp.asp Thanks. Is this what you're looking for? http://www.codeproject.com/shell/cpl.asp Tom <hugheslin@hotmail.com> wrote in message news:1145355183.002746.18420@z34g2000cwc.googlegroups.com... > Hi, > > Is there anybody know how to add a cus...

Windows Vista Service pack 2
I get automatic updates from Microsoft. Everytime my computer tries to install Windosw Vista Service pack 2, it always fails. All other updates are marked as successful however this Windows Vista Service pack 2 has failed about twenty times. What can I do? I assume this is an important update but my computer just will not allow for this update. -- kdi Free unlimited installation and compatibility support is available for Windows Vista SP2 issues until 26 February 2010. Availability of chat or e-mail support differs depending on your geographic location. Some issues may requi...

why i can not run excel2000 in windows XP?
i have installed office2000 in windows XP correctly, but i can not open it. after the splash window, there are nothing displayed. please tell me why i met that mistake and how to resolve it. thank you for your help The following MSKB article may help: OFF2000: Program Quits Immediately After Starting When SR-1/SR-1a Update Is Applied http://support.microsoft.com/default.aspx?id=255503 bugbug wrote: > i have installed office2000 in windows XP correctly, but i > can not open it. after the splash window, there are nothing > displayed. > please tell me why i met that mistake ...

Chart using Macro
I have several sheets having similar data for different lanes. I have a macro which can create a graph I want with different series plotted in different forms for source data on a particular sheet. I want to be able to create a graph for the active sheet. How do I use ActiveSheet data as source data for the gaph. ...

[Windows 7] Move "Show Desktop" to the left side of taskbar, how to? (w/pic)
I want the "Show Desktop" button to be by the start button like it was in XP. How to do that? Pic is self-explanitory --> http://i46.tinypic.com/257qbmb.jpg See http://www.msfn.org/board/regards-moving-show-desktop-t128691.html&s=beadc2ca061fa0aff6d25b3f0f85f790 On 29/11/2009 13:32, G. Morgan wrote: > I want the "Show Desktop" button to be by the start button like it was in XP. > How to do that? > > Pic is self-explanitory --> > http://i46.tinypic.com/257qbmb.jpg ...

Add more than one series to a pivot chart using VB MS Access continued...
I'm trying to programmatically create a stacked bar pivot chart. Using "Programming Microsoft Office Access 2003" by Rick Dobson, I've created the chart. However, it doesn't distinguish between the different values for the series. Does anyone have any suggestions on how to create a chart using one column containing three values for the series? Essentially, this is a continuation of a previous post: http://groups.google.com/group/microsoft.public.access.formscoding/browse_thread/thread/e23f3506a6d561a0/674295d410a71cf9%23674295d410a71cf9" Any help is greatly appre...

Splitting a single row into multiple copies
I have a very weird situation that I'm hoping some of you might have seen (and possibly resolved). We're migrating data from one system to another and the business rules have changed. System 1 allowed a user to create a record for an item with a quantity > 1. System 2 doesn't permit a quantity > 1 for certain items. Is there a way to create multiple rows in the source table (or an intermediate table) based on a list of item types which are not allowed to have a quantity > 1? Any help would be greatly appreciated. Joel j_racicot@hotmail.com wrote: >I have a very...

how to use RichInk control for Mobile word
Hi all, I am trying to view the word documents in Pocket PC. I got some MFC code in the following link. http://www.pocketpcdn.com/articles/word_embed.html It is doing well for reading Pocket PC 2003 word document (.psw). I tried this to read Mobile word ( Word document for WM 5.0).It showing some same invalid data for any input. If anybody has idea on it please help me.. Thank you, Supriya. ...

End Program Hanging...after using Money Deluxe
After using MS Money Deluxe, Win XP, All files are current and up to date : When I close Money and want to shut the computer down I get a message pop up, End Program : 5A25A898 THAT HANGS, Then I get another END PROGRAM: MCI Command Handling. Then I invoke Task Manager to end all tasks and the computer shuts down. Any suggestions. Thanks In Advance In microsoft.public.money, Birdflu wrote: >After using MS Money Deluxe, Win XP, All files are current and up to date : > >When I close Money and want to shut the computer down I get a message pop >up, End Program : 5A25A898 THAT...

Relaying using AUTH
Someone had guess a weak password on one of my user accounts, and was using this with the AUTH command to relay messages off my Exchange 5.5 IMC. I enabled protocol logging, and saw the AUTH commands, and tracked down what account they were using with a base64 decoder and disabled the account. Now I want to find out what IP address these were originating from so I can repay the SOB. However, the protocol log only has hostnames where it says "accepting connection from hostname.domain.com". and the host names are bogus. I tested it, and it logs whatever you have entered a...

Windows SBS 2008 domain purchase and configuration wiza has stoppe
when clicking setup your internet address in windows SBS console, i select already have a domain name and i will manage it myself. a few seconds later i get the error "Windows SBS 2008 domain purchase and configuration wiza has stopped working" the only choice is to close the program. What do i need to do to fix this error without reinstalling everything? Is your server up to date with all patches? In particular, SP2? -- Cliff Galiher Microsoft has opened the Small Business Server forum on Technet! Check it out! http://social.technet.microsoft.com/Forums/en...

Excel 97 on Windows XP data sort error
I have had sorting errors using Excel 97 running on Windows XP. Is there a fix for this? I check Excel updates and the microsoft website says I already have all updates. Please tell what sort of errors. "Steve P" <anonymous@discussions.microsoft.com> wrote in message news:00af01c39601$ad0c3d20$a001280a@phx.gbl... > I have had sorting errors using Excel 97 running on > Windows XP. Is there a fix for this? I check Excel > updates and the microsoft website says I already have all > updates. Sort errors are almost always data problems. You might have numeri...

Can I run proprietary Windows Software on Remote Desktop?
Operating System: Mac OS X 10.4 (Tiger) Processor: Power PC I am using a PowerPC G5 Mac Mini. I am taking a course that requires a minimum of Windows XP or Vista. Can I install the course software on Remote Desktop so that I can use it to take this class, or is this just for using MS Office programs? Also, what is the cost of this service? On 3/24/08 12:03 PM, in article ee95dbc.-1@webcrossing.caR9absDaxw, "boyerml@officeformac.com" <boyerml@officeformac.com> wrote: > Operating System: Mac OS X 10.4 (Tiger) > Processor: Power PC > > I am using a PowerPC G5 Mac ...

looking for control to display dialog similar to VC NET option window
I would like to implement a dialog similar to the VC++ NET options window. The left side of the options windows contains a tree control used to select general category of options that will be viewed/edited. The right side of the options window displays an dialog that allows the user to view/edit specific options. Are there any shareware/commercials controls available that provide this functionality? Thanks in advance. Ian I think I've seen something like that in www.codeproject.com (and for free) ...

using the time structure with MFC
Hi, Coming from C, how could I translate this into MFC based code (using CString)? char szTime[65], szDate[65]; time_t t = time(0); struct tm* tm = localtime(&t); strftime(szDate, 64, "%Y%m%d", tm); strftime(szTime, 64, "%H%M%S", tm); CString strTime, strDate; Thanks CTime Time = CTime::GetCurrentTime(); CString strDate = Time.Format("%Y%m%d"); CString strTime = Time.Format("%H%M%S"); AliR. "markww" <markww@gmail.com> wrote in message news:1156883820.948360.39250@m79g200...

Excel Automation using in VC 2005
Hi all, I am doing excel automation using MFC in VC 2005. It is just a simple program to just open an excel sheet nothing more than that. I have followed steps describerd in this link: http://support.microsoft.com/kb/308407 But when i build the project it is giving following errors, Can any body tell why it is happening like this..? Errors: error C2371: 'FontPtr' : redefinition; different basic types error C2786: 'BOOL (__stdcall *)(HDC,int,int,int,int)' : invalid operand for __uuidof error C2923: '_com_IIID' : 'Rectangle' is not a valid template type arg...

How to add controls to window in code (.cpp)
I'm a newbie trying to add some controls to a window in a .cpp file. More specifically, I created a .NET 2003 C++ MFC Application, called it TestGUI In the function BOOL CTestGUIDlg::OnInitDialog(), I adde CSliderCtrl *pSlider = new CSliderCtrl() pSlider->Create(TBS_VERT, CRect(10,20,40,60), this, 2000) This compiles and runs, but the slider does not show up . What is wrong Thanks alot! Hi Vufgar - Do this CSliderCtrl *pSlider = new CSliderCtrl() pSlider->Create(WS_CHILD|WS_VISIBLE|TBS_VERT, CRect(10,20,40,60), this, 2000) - Yaso Oh yeah, I forgot to tell you. Con...

How to use C# DLL in MFC
Hi all, I developed one C# DLL. now i want to use that DLL to my MFC application created using vc++. Can any one help me how to load those DLL's.... Thanks in advance, SaranG SaranG(Saravanan) wrote: > Hi all, > I developed one C# DLL. now i want to use that DLL to my MFC > application created using vc++. Can any one help me how to load those > DLL's.... > > > Thanks in advance, > SaranG > > I think you could do that through COM interop. Regards, F. Firstly, this is the wrong newsgroup for this question...anyways... you can ...

How do I get certificates to use to send from email addresses???
Everything seemed to go well in setting up email addresses in outlook. They tested fine and I have no problem receiving messages in outlook. The problem comes when I try to send messages .... and I've tried sending from outlook using each and every email address I've set up. This is the message I get: "Microsoft Outlook could not sign or encrypt this message because you have no certificates which can be used to send from the email address mpenza17@verizon.com." I've tried going to sites and downloading certificates. They don't seem to appear in outlook??? A...

Message box warns for duplicate use of named ranges when copying s
I created an Exel/VBA2003 application in which a copy of a worksheet is added when the user pushes some button on the main form. In the worksheet which is copied, I use a few named ranges. This works fine in 2003. In 2007, however, a message box pops up that warns for duplicate use of the named range in the new sheet. Since there are 5 ranges, it is quite annoying to cancel these message boxes every time. Can I programmatically prevent these msg boxes from popping up ? Thanks ! Found one answer on pcreview (gracias a Hector Miguel): add Application.DisplayAlerts = False a...

How to use IN and Sub query?
Greeting, Anyone can explain for me the Using of IN and Sub query? I have the following situation I need to List the customers who bought dogs in the first quarter and also bought dog food in the fourth quarter using IN and Sub query My tables are as follows: Table Animal has AnimalID Category Table Customers CustomerID Phone Name Table Sales CustomeriD SaleDate SaleID Table Saleanimal SaleID AnimalID SalePrice Table SaleItem SaleiD ItemID Table Merchandise Item ID Description Guessing at relationships based on your table and field names. SELEC...

there used to be an email "+" folder field
Some time ago there used to be some standard that if your email address was a@b.com, you could give out your address as a+c@b.com and when your email arrived it went into a folder named "c". In effect, anything after the "+" was like a comment. I thought it was a cool feature at the time, but I could nto get it to work. I think this would be a great feature to help us tame email, no? - = - Vasos-Peter John Panagiotopoulos II, Columbia'81+, Bio$trategist BachMozart ReaganQuayle EvrytanoKastorian http://ourworld.compuserve.com/homepages/vjp2/vas...

How to store jpg in a database for use in another sheet #2
Can somebody please explain me how to store jpg's in a database and le them show in another sheet when entering a specific key -- Marc Willems ----------------------------------------------------------------------- Marc Willemse's Profile: http://www.msusenet.com/member.php?userid=164 View this thread: http://www.msusenet.com/t-187045633 ...

Memory allocation in Windows XP
Can Visual Studio 2005 allocate and use most all of the possible 4.0 GB of memory in Windows XP, or are there issues with this? In this case we assume 32-bit development in a 32-bit OS. Are there any issues with memory allocation and usage with Microsoft Windows XP Professional x64 Edition and 32-bit development? PeteOlcott wrote: > Can Visual Studio 2005 allocate and use most all of the possible 4.0 > GB of memory in Windows XP, or are there issues with this? In this > case we assume 32-bit development in a 32-bit OS. <http://msdn.microsoft.com/en-us/library/wz223b1z(VS.80).asp...

windows live mail closes when I try to add more stationary
Please help I have downloaded new stationary for my Windows Live Mail. I have unzipped it and it shows in my stationary folder But when I double click it to actually use it in a new mail. It closes down my e-mail program. Can anyone help. Thanks in advance. What is your operating system? Which edition? And is it 32-bit or 64-bit? Have you tried compatibility mode? Which version of wlmail.exe are you using? "Sharon " <gwen6039@shaw.ca> wrote in message news:#lk4sJvzKHA.4384@TK2MSFTNGP06.phx.gbl... > Please help > I have downloaded new stationary for my Wi...