Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

CScrollView in Modal Dialog Box

Posted on 2000-04-02
2
Medium Priority
?
673 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
[X]
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
2 Comments
 
LVL 10

Accepted Solution

by:
RONSLOW earned 400 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
In this post we will learn different types of Android Layout and some basics of an Android App.
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.
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

609 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