Click here to Skip to main content
15,888,979 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
I m trying to make the program automatically run without showing the user interface.

I m trying to use enddialog()and destroywindow() function in CDialog Class. But I find either way will terminate the program. What I expect is to just hide or close the dialog box but the program can continue (sending or receiving data). Anyone knows how to achieve this?

Thanks ahead.
Posted
Updated 15-Aug-11 20:00pm
v8
Comments
Richard MacCutchan 16-Aug-11 5:47am    
Why are you using a Dialog box in this instance? Create a normal Windows application and make sure it is not visible when the program runs.

1 solution

Remove the WS_VISIBLE style from the window or dialog.

But ... do something to allow the user to make it visible again, otherwise it will be impossible to close your app.
 
Share this answer
 
Comments
sandy_1126 16-Aug-11 3:30am    
Hi,Emilio.I have edited the rc file and removed the WS_VISIBLE style ( also try NOT WS_VISIBLE style), but the dialog is still displayed. Anyway, thx a lot!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900