Where to put ? 
Author Message
 Where to put ?

Hi,
I wrote a procedure that will last approximetely 5 minutes.
Now i want to show a dialog window while this function is running.
First i tried to create a dialog and called it with DoModal(), but th eproblem is
i can not do anything before DoModal dialog returns me. So then i decided to
cretae a window then run the procedure in the windows WM_ACTIVE message but still
sam problem occurs.
So here is my question at last : how can i show a dialog while my procedure is
runnning and then after the procedure finished up , terminate the dialog


Tue, 14 Oct 2003 03:12:24 GMT  
 Where to put ?
[snip]

Quote:
>So here is my question at last : how can i show a dialog while my procedure
is
>runnning and then after the procedure finished up , terminate the dialog

You could have the dialog call the procedure. It will simply not
respoind to any buttons clicked until the procedure returns.
If the procedure is in a static function, you could pass the
dialog a function pointer and have it call the function with
the correct arguments.

Dan Evens



Tue, 14 Oct 2003 06:08:38 GMT  
 Where to put ?
Put the procedure in a worker thread.



Quote:
>Hi,
>I wrote a procedure that will last approximetely 5 minutes.
>Now i want to show a dialog window while this function is running.
>First i tried to create a dialog and called it with DoModal(), but th eproblem is
>i can not do anything before DoModal dialog returns me. So then i decided to
>cretae a window then run the procedure in the windows WM_ACTIVE message but still
>sam problem occurs.
>So here is my question at last : how can i show a dialog while my procedure is
>runnning and then after the procedure finished up , terminate the dialog

Don Grasberger

(remove --- from address to e-mail)



Fri, 17 Oct 2003 21:41:47 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. an ATL Activex Control could not put on dialog in VC, but it can be put on VB dialog

2. an ATL Activex Control could not put on dialog in VC, but it can be put on VB dialog

3. putting datagrid into edit mode

4. Reading Hex from File and Putting it in a Packet

5. Exception happens in case of putting NET control on the from in design-time

6. printf() and puts()

7. newbie: using System / where to put Main()

8. Put a MS Word editor on a WinForm

9. Saving C as a file to put through a compiler

10. Is it possible to put PictureBox on toolbar

11. Question: Best place to put global variables on a VS.NET C# project

12. How do I put binary zeros in a string

 

 
Powered by phpBB® Forum Software