plz help me out
-
hi..,:-D a happy n prosperous new year.., my app makes use of ShellExecuteEx to run an initializing process(on OnInitInstance). It takes some 5 to 7 seconds to finish, so i spawn a thread which has a progressbar which steps for 7 secs. my app WaitForSingleInstance till the Delay(Progress)Dlg PostQuitMessage. Then it doModals the main dlg. Its all workin fine but when my main dlg is shown, it loses focus. I've tried setActivewnd, setforegrndwnd, setfocus, etc. on the InitInstance of my main dlg. i wanna kno how i can bring da dlg to the foregrnd. also on enter/esc key press the app exits, its the OnOK() OnCancel(), nope? can i prevent this by a do nothin override? thanks, -- ano
-
hi..,:-D a happy n prosperous new year.., my app makes use of ShellExecuteEx to run an initializing process(on OnInitInstance). It takes some 5 to 7 seconds to finish, so i spawn a thread which has a progressbar which steps for 7 secs. my app WaitForSingleInstance till the Delay(Progress)Dlg PostQuitMessage. Then it doModals the main dlg. Its all workin fine but when my main dlg is shown, it loses focus. I've tried setActivewnd, setforegrndwnd, setfocus, etc. on the InitInstance of my main dlg. i wanna kno how i can bring da dlg to the foregrnd. also on enter/esc key press the app exits, its the OnOK() OnCancel(), nope? can i prevent this by a do nothin override? thanks, -- ano
whizano wrote:
so i spawn a thread
I think this is the reason. The main thread does not own the dialog. I think so. Since you are popping up the dialog from this thread.
whizano wrote:
Then it doModals
How can you call all those functions when you have called DoModal()... Coz unless the dialog closes nothing will work. Calling before won't work too.
Jesus Loves You and Me :)
--Owner Drawn --Nothing special --Defeat is temporary but surrender is permanent --Never say quits --Jesus is Lord
-
whizano wrote:
so i spawn a thread
I think this is the reason. The main thread does not own the dialog. I think so. Since you are popping up the dialog from this thread.
whizano wrote:
Then it doModals
How can you call all those functions when you have called DoModal()... Coz unless the dialog closes nothing will work. Calling before won't work too.
Jesus Loves You and Me :)
--Owner Drawn --Nothing special --Defeat is temporary but surrender is permanent --Never say quits --Jesus is Lord