?
Solved

Modeless Dialog from OLE server

Posted on 1998-05-28
4
Medium Priority
?
219 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

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

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.
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Suggested Courses
Course of the Month14 days, 11 hours left to enroll

771 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