Solved

A CDialog with a CView in the middle?

Posted on 1997-05-06
3
432 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
[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
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VBA "SendKeys" Syntax for Multiple Keystrokes 7 133
fizzArray  challenge 1 115
matchUp  challenge 9 134
Work with App store 7 121
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.

734 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