Click here to Skip to main content
15,909,205 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,all friends

I am a new coder.

I write a AutoUpdate MFC program.
Process:
step1:close master PGM.
step2:check PGM version.
step3:check other files.
step4:open master PGM.
step5:exit update PGM.
and the update pgm only has a progress bar control.

Because all codes were written in OnInitDialog(),when the codes were run finish,Popup Update PGM and progress already was 100%.
This result is not what I want.

I want popup PGM -> run code
Not is run code -> popup PGM

Now I don't know how to do?

BR!
Thank you.
Posted
Updated 7-Aug-13 14:03pm
v4

There is no such concept of "autorun" of function, no matter where. A function are called only when some other code calls it. You may not believe that, but it includes even the main function.

It's totally up to you to design the software the way the functions would be called on certain events or any chain of calls or, say, exceptions you want to have.

—SA
 
Share this answer
 
After OnPaint() code,write code!
 
Share this answer
 

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