How to perform something after dialog is initialized and displayed.
-
Hi all, I want to perform file copy operations and display a progress-bar after my dialog has just been initialized and displayed with out any user action such as clicking on a button... However I cannot put that codes in the OnInitDialog() virtual function of that dialog. If I do that, the dialog will appear after all operations are ended. Please help to show me how to do that. Thanks in advance.
-
Hi all, I want to perform file copy operations and display a progress-bar after my dialog has just been initialized and displayed with out any user action such as clicking on a button... However I cannot put that codes in the OnInitDialog() virtual function of that dialog. If I do that, the dialog will appear after all operations are ended. Please help to show me how to do that. Thanks in advance.
Hi. U r requirement is to display this progress only when user starts the file transfer operation say by clicking on any button. You can take the following approach... 1. Add the Progress at the time of Layouting your dialog box. 2. Keep that progress bar invisible. 3. When user starts file transfer process; make that progress bar visible. U can use CWnd::ShowWindow(TRUE/FALSE) to show and hide perticular control.
Sameer Thakur
-
Hi all, I want to perform file copy operations and display a progress-bar after my dialog has just been initialized and displayed with out any user action such as clicking on a button... However I cannot put that codes in the OnInitDialog() virtual function of that dialog. If I do that, the dialog will appear after all operations are ended. Please help to show me how to do that. Thanks in advance.
One easy way would be to set a timer (SetTimer) in your OnInitDialog and in the handler for the timer, kill the timer and start your copy process. You could probably get away with just a 10-20 millisecond setting for the timer. Hope that helps.
Karl - WK5M PP-ASEL-IA (N43CS) PGP Key: 0xDB02E193 PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193
-
Hi all, I want to perform file copy operations and display a progress-bar after my dialog has just been initialized and displayed with out any user action such as clicking on a button... However I cannot put that codes in the OnInitDialog() virtual function of that dialog. If I do that, the dialog will appear after all operations are ended. Please help to show me how to do that. Thanks in advance.
The way I've always done this is to post a user-defined message right before
OnInitDialog()
returns. In your handler for that message, do your processing.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
-
Hi. U r requirement is to display this progress only when user starts the file transfer operation say by clicking on any button. You can take the following approach... 1. Add the Progress at the time of Layouting your dialog box. 2. Keep that progress bar invisible. 3. When user starts file transfer process; make that progress bar visible. U can use CWnd::ShowWindow(TRUE/FALSE) to show and hide perticular control.
Sameer Thakur
-
The way I've always done this is to post a user-defined message right before
OnInitDialog()
returns. In your handler for that message, do your processing.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
-
The way I've always done this is to post a user-defined message right before
OnInitDialog()
returns. In your handler for that message, do your processing.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb