Solved

Modeless windows

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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Suggested Solutions

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…
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
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 shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

772 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