Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

A CDialog with a CView in the middle?

Posted on 1997-05-06
3
Medium Priority
?
441 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 200 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

730 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