Solved

Modeless windows

Posted on 1998-07-28
1
175 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
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.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

932 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

10 Experts available now in Live!

Get 1:1 Help Now