Solved

A CDialog with a CView in the middle?

Posted on 1997-05-06
3
422 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
ID: 1301375
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
ID: 1301376
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
ID: 1301377
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

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Generic progress indicator 6 117
Expand to include initial dialog with two choices. 9 78
notReplace  challenge 53 131
EvenOdd challenge 10 109
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

831 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