Solved

Modeless windows

Posted on 1998-07-28
1
162 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
1 Comment
 
LVL 1

Accepted Solution

by:
motigust earned 100 total points
Comment Utility
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

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: 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 …
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 video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

763 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

8 Experts available now in Live!

Get 1:1 Help Now