Solved

Modeless windows

Posted on 1998-07-28
1
208 Views
Last Modified: 2013-11-20
I am writing an application(MDI) that has a modless dialog box with a slider control on it.  As it moves I want to print a number 0-100 in the View window.  Can you give me some ideas on how to do this.
0
Comment
Question by:jimbo011697
[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
1 Comment
 
LVL 1

Accepted Solution

by:
motigust earned 100 total points
ID: 1319852
This is a classic case of Document-View Model.

You sould have a variable in your CDocument derived Object, That holds the current value of your slider, and methods to update it.

The dialog box should be able to call these methods each time the slide is bwing updated. (You can pass a pointer to the CDocument, or to make a function in the CWinApp theat will return the active document).

The CDocument function should call UpdateAllViews each time it changes the value of your variable.

The View should handle this event in the OnUpdate function.

That's a long description, but it is very easy to implement.

Good Luck!
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
if loop in java 3 174
while loop over for loop 7 119
has22 challenge 11 109
Fibonacci challenge 11 141
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
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.
Suggested Courses

737 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