How to implement a 'please wait' dialog..
-
Hi people, Does anyone have any suggestions on how to implement the following: I've made a three page wizard and after the user clicks finish on the third page, I want to pop up a small dialog with nothing but a cancel button and a "Please wait while the data is being saved." message. My initial plan was to let that dialog do the saving, although that means I'll need to make some detours to access the data that needs to be saved. The problem with that is that I can't seem to find the right windows message handler to start the saving procedure in. Basically, I can't find a WM that fires right after the dialog is shown on screen. Another approach would be to let the wizard itself handle the saving, but in that case I'd have to make my 'please wait' dialog non-modal. And naturally, I don't want the user tampering with the wizard while it's saving. On top of that, it becomes more complicated to implement the cancel button. I can't see that happening without setting up separate threads. That somehow seems too complicated. Anyone feel like pointing out the simple path that I'm sure is there somewhere? Thanks a lot... ren
-
Hi people, Does anyone have any suggestions on how to implement the following: I've made a three page wizard and after the user clicks finish on the third page, I want to pop up a small dialog with nothing but a cancel button and a "Please wait while the data is being saved." message. My initial plan was to let that dialog do the saving, although that means I'll need to make some detours to access the data that needs to be saved. The problem with that is that I can't seem to find the right windows message handler to start the saving procedure in. Basically, I can't find a WM that fires right after the dialog is shown on screen. Another approach would be to let the wizard itself handle the saving, but in that case I'd have to make my 'please wait' dialog non-modal. And naturally, I don't want the user tampering with the wizard while it's saving. On top of that, it becomes more complicated to implement the cancel button. I can't see that happening without setting up separate threads. That somehow seems too complicated. Anyone feel like pointing out the simple path that I'm sure is there somewhere? Thanks a lot... ren
renegade the immortal wrote: Basically, I can't find a WM that fires right after the dialog is shown on screen. In your WM_INITDIALOG handler, call ShowWindow() to make the dialog visible. --Mike-- Just released - RightClick-Encrypt v1.3 - Adds fast & easy file encryption to Explorer My really out-of-date homepage Sonork-100.19012 Acid_Helm
-
Hi people, Does anyone have any suggestions on how to implement the following: I've made a three page wizard and after the user clicks finish on the third page, I want to pop up a small dialog with nothing but a cancel button and a "Please wait while the data is being saved." message. My initial plan was to let that dialog do the saving, although that means I'll need to make some detours to access the data that needs to be saved. The problem with that is that I can't seem to find the right windows message handler to start the saving procedure in. Basically, I can't find a WM that fires right after the dialog is shown on screen. Another approach would be to let the wizard itself handle the saving, but in that case I'd have to make my 'please wait' dialog non-modal. And naturally, I don't want the user tampering with the wizard while it's saving. On top of that, it becomes more complicated to implement the cancel button. I can't see that happening without setting up separate threads. That somehow seems too complicated. Anyone feel like pointing out the simple path that I'm sure is there somewhere? Thanks a lot... ren
separate threads. That somehow seems too complicated. No, you should use threads for your problem. Because you just need a worker thread, so you can use
AfxBeginThread
. Ex: Declare: static UINT SaveThread(LPVOID lParam) Implement: UINT SaveThread(LPVOID lParam) Calling: AfxBeginThread(SaveThread,yourParam); Hung Son A Vietnamese student i-g.hypermart.net dlhson2001@yahoo.com