Solved

A CDialog with a CView in the middle?

Posted on 1997-05-06
3
410 Views
Last Modified: 2013-11-20
I would like to be able to create a dialog type window with a small view window in the middle of it, on which I could display and interact with a bitmap file.

It would have various controls surrounding it, and look something like the Display Properties Screen Saver tab in Win 95.

How would I tackle this using CDialog and CView, or can anyone suggest a better approach?

Thanks.
0
Comment
Question by:wagtail
  • 2
3 Comments
 
LVL 2

Accepted Solution

by:
sapek earned 100 total points
Comment Utility
CView classes require CDocument and CFrame so its not good idea to use it in a dialog. You can create an child window of arbitrary window class (your own) in a dialog (it is how custom controls where used in dialogs in the past). The only problem is that its not easy to create a new window class in MFC (MFC gives you the name of the class and in fact it gives you window procedure). You could search for a way to do this in MFC or create the interactive bitmap window class using win32 API (unless you only program in MFC the second is easier I think).Adam
0
 

Author Comment

by:wagtail
Comment Utility
Hi Adam,

Thanks for your speedy reply. Could you give a bit more detail to help me understand?

When you talk about  creating my own window class using the Win32 API, do you mean I have to register a WNDCLASS structure with Windows, then create an instance of the window?

If so, is CMyApp::InitInstance() the right place to put this code?

I am confused about how to attach the new window object to the CDialog, so that it becomes a child window of the dialog. Can you explain how to do this?

Thanks very much...
0
 

Author Comment

by:wagtail
Comment Utility
I'm disappointed at the silence after my request for clarification, which I felt was reasonable given the 100 points offered... still, you win some and you lose some. In situations like these it would be useful to have the expert's e-mail address to get his/her attention.
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
MFC Dialog 9 47
countEvens challenge 2 55
EvenOdd challenge 10 81
Annoying "thing" blocks my view 4 48
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

728 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now