[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Modeless Dialog from OLE server

Posted on 1998-05-28
4
Medium Priority
?
221 Views
Last Modified: 2013-11-19
I want to create a modeless dialog with a progress bar and a cancel button to be used in an OLE server. The ole server is a simulation engine. the progress indicator will display simulation time and the cancel button needs to end the simulation loop. I have seen modeless dialog examples similar to this but require the owner to be of a CWND baseclass. where my ole server is of base class ctarget. I think the biggest problem is how to handle  the oncancel message.
0
Comment
Question by:chrisSchell
[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
4 Comments
 
LVL 2

Expert Comment

by:lucidity
ID: 1315676
A modeless dialog is essentially a seperate thread, when your dialog gets the WM_CLOSE it should PostMessage() to your main app then terminate. I have some code for a modeless dialog but it uses the CWnd base class, sorry.
0
 

Author Comment

by:chrisSchell
ID: 1315677
The server is not running a message pump, it is the client.
0
 

Expert Comment

by:t004024
ID: 1315678
As far as I can think U should have a CWinApp derived class which is basically a Thread, So choosing cancel in the dialog box, would basically have to terminate the other thread. So maybe U could create a user message and call PostThreadMessage from the DialogBox to U'r main thread and call ExitThread in the Message handler...
0
 
LVL 3

Accepted Solution

by:
Norbert earned 100 total points
ID: 1315679
who holds  the dialog the server or the client ?
If the server creates the dialog it also has the window so all what you want to do should be possible because you have a CWnd based class. If the Client holds the dialog the server has to provide properties methods and events so the client can update the dialog. In that case  it should not be a big problem to call a property or method of the server when the client recived an OnCancel message.
0

Featured Post

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

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

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: 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…
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.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

656 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