Solved

Modeless Dialog from OLE server

Posted on 1998-05-28
4
206 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
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 50 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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Need a Shell script to start a service checking the port 6 50
countEvens challenge 2 100
mapAB Challlenge 35 144
Work with App store 7 52
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

770 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