PostponeShortcutCheck — Postpones Shortcut Check


void PostponeShortcutCheck (void); 




Postpone keyboard shortcut checking during multiple changes to a dialog.

Normally, keyboard shortcuts are checked automatically when a dialog is created or changed. This can lead to confusion, however, when multiple changes to a dialog (repeated ReplaceWidget() calls) cause unwanted intermediate states that may result in shortcut conflicts while the dialog is not final yet. Use this function to postpone this checking until all changes to the dialog are done and then explicitly check with CheckShortcuts(). Do this before the next call to UserInput() or PollInput() to make sure the dialog doesn't change "on the fly" while the user tries to use one of those shortcuts.

The next call to UserInput() or PollInput() will automatically perform that check if it hasn't happened yet, any an error will be issued into the log file.

Use only when really necessary. The automatic should do well in most cases.

The normal sequence looks like this:

ReplaceWidget( ... );
ReplaceWidget( ... );
ReplaceWidget( ... );