Solved

CScrollView in Modal Dialog Box

Posted on 2000-04-02
2
663 Views
Last Modified: 2013-11-20
I have a static dialogbox that contains a dynamically allocated CScrollView class. After calling DoModal the dialog box and View appear fine but when I click inside the view, it crashes. I traced it down to CView::OnMouseActivate
It fails on the following line:
// eat it if this will cause activation
            ASSERT(pParentFrame == pDesktopWnd || pDesktopWnd->IsChild(pParentFrame));

Any suggestion as to how to overcome this problem. Thanks.
0
Comment
Question by:HVDC
2 Comments
 
LVL 10

Accepted Solution

by:
RONSLOW earned 100 total points
ID: 2678619
You need to do some trickery to make a CView fit in a dialog.

CViews are made to only work within a CFrameWnd-derived class, not a CDialog. Also they require a document (hope you created one of those).

MSJ (jan 2000, C++ Q&A) is about embedding a view in a dialog (in particular a CHtmlView).  That may give you the info you need on how to tweak a CView-derived class so it will work inside a CDialog.

see http://www.microsoft.com/msj/0100/c++/c++0100.asp

0
 

Author Comment

by:HVDC
ID: 2682317
Thanks. This could have taken a while.
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Windows Drag & Drop Location 2 100
not able to insert into temp table 68 162
Generic progress indicator 6 116
has22 challenge 11 93
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question