int DictViewFactory::NextUID()
{
  static const char *last_uid_key = "LastUID";
  int uid = reg.GetRegKey("", last_uid_key, 100000) + 1;
  reg.SetRegKey("", last_uid_key, uid);
  return uid;
}