Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

CScrollView in Modal Dialog Box

Posted on 2000-04-02
2
667 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Shell script to login to remote m/c and execute commands 10 78
WinWaitActive parameters 12 31
Unix Command -- Challenging  question 7 96
Detect file exist or not 3 179
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

856 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