Link to home
Start Free TrialLog in
Avatar of osnat
osnat

asked on

Improving performance in a dialog DLL

Hi experts!
This is my question: I have a dialog based DLL. in the OnInitDialog function I call another function (LoadControls) that init all the combo box-s in the dialog, using the DB. I have a lot of combo and I need to init all of them from DB tables. hence - the OnInitDialog gets very slow. I would like to remove the call to LoadControls from the OnInitDialod and right after that to call it. That way the dialog is displayed and the user is under the impression that all is OK. mean while - I load (behind the scene) all the data for the combos. I imagine that there is an event I have to catch. which one?
Avatar of mblat
mblat

You can start separate thread in OnInitDilaog and let it handle combo-box loading...

Of cause you need to make sure that user won't start using comboboxes before you load them...
ASKER CERTIFIED SOLUTION
Avatar of DanRollins
DanRollins
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of osnat

ASKER

I'm sorry but I don't work with the wizard; I edit the code all by my self! I've added the function manually and did all u said. I added a MessageBox in the function OnContinueSetup  but it never pops up. I'm missing something. what is it?
Avatar of osnat

ASKER

Forget it! I did it - all it needs was the
ON_COMMAND(IDC_ContinueSetup, OnContinueSetup)
Thanks!
hi osnat,
Thanks for accepting my comment as an answer.  However, I am curious as to why you gave me a 'B.'  It seems that my comment help you out a lot, but now my overall grade-point-average has declined.  It is discouraging to me.

-- Dan