Пример #1
0
void RegistryVar::setInt(UINT id, int value, HKEY root)
    {
     CString pathname;

     pathname.LoadString(id);
     SetRegistryInt(root, pathname, value);
    }
Пример #2
0
BOOL RegistryVar::setInt(UINT id, DWORD value, HKEY root)
    {
     CString pathname;

     pathname.LoadString(id);
     return SetRegistryInt(root, pathname, value);
    }
Пример #3
0
BOOL SetRegistryInt(HKEY root, const CString & path, const CString & var, DWORD val)
   {
    CString s = path;
    s += _T("\\");
    s += var;
    return SetRegistryInt(root, s, val);
   } // SetRegistryInt
Пример #4
0
BOOL SetRegistryInt(HKEY root, const CString & path, UINT var, DWORD val)
   {
    CString s = path;
    s += _T("\\");
    CString t;
    t.LoadString(var);
    s += t;
    return SetRegistryInt(root, s, val);
   } // SetRegistryInt
Пример #5
0
BOOL SetRegistryWindowPlacement(HKEY root, const CString & var, const WINDOWPLACEMENT * wp)
    {
     ASSERT(wp != NULL);
     BOOL ok = TRUE;
     CString s;
     s.LoadString(IDS_KEY_PLACEMENT_FLAGS);
     //================
     // length
     // flags
     //================
     ok &= SetRegistryInt(root, var, s, wp->flags);

     //================
     // showCmd
     //================
     s.LoadString(IDS_KEY_PLACEMENT_SHOWCMD);
     ok &= SetRegistryInt(root, var, s, wp->showCmd);

     //================
     // ptMinPosition.x
     //================
     s.LoadString(IDS_KEY_PLACEMENT_MINPOSITION_X);
     ok &= SetRegistryInt(root, var, s, wp->ptMinPosition.x);

     //================
     // ptMinMposition.y
     //================
     s.LoadString(IDS_KEY_PLACEMENT_MINPOSITION_Y);
     ok &= SetRegistryInt(root, var, s, wp->ptMinPosition.y);

     //================
     // ptMaxPosition.x
     //================
     s.LoadString(IDS_KEY_PLACEMENT_MAXPOSITION_X);
     ok &= SetRegistryInt(root, var, s, wp->ptMaxPosition.x);

     //================
     // ptMaxMposition.y
     //================
     s.LoadString(IDS_KEY_PLACEMENT_MAXPOSITION_Y);
     ok &= SetRegistryInt(root, var, s, wp->ptMaxPosition.y);

     //================
     // rcNormalPosition.left
     //================
     s.LoadString(IDS_KEY_PLACEMENT_NORMAL_LEFT);
     ok &= SetRegistryInt(root, var, s, wp->rcNormalPosition.left);

     //================
     // rcNormalPosition.top
     //================
     s.LoadString(IDS_KEY_PLACEMENT_NORMAL_TOP);
     ok &= SetRegistryInt(root, var, s, wp->rcNormalPosition.top);

     //================
     // rcNormalPosition.right
     //================
     s.LoadString(IDS_KEY_PLACEMENT_NORMAL_RIGHT);
     ok &= SetRegistryInt(root, var, s, wp->rcNormalPosition.right);

     //================
     // rcNormalPosition.bottom
     //================
     s.LoadString(IDS_KEY_PLACEMENT_NORMAL_BOTTOM);
     ok &= SetRegistryInt(root, var, s, wp->rcNormalPosition.bottom);

     return TRUE;
    } // SetRegistryWindowPlacement