View Full Version : Focus problem

04-04-2002, 05:52 AM
I'm using the function _WinSubFocusControl to set the focus on a given control in a custom dialog.

Here is how I'm using it :
In the WaitOnDialog loop, case DLG_INIT, I set the focus on a given control (depending on some values entered before).
This means that yes, I'm trying to set the focus before the window is effectively visible.
The exact code line is :
_WinSubFocusControl(CmdGetHwndDlg(szDialogName), nCtrlID);

While executing it, I get a severe error : "InstallShield can not call DLL function: SetFocus"

If I open a MessageBox just before, it works. I tried to delay it with a Delay() command, but if it worked on a given dialog, it didn't for all of them...

Does anybody knows something ?