Q Registers/Subkeys Howto use? 
Author Message
 Q Registers/Subkeys Howto use?

Hello, a question about registers.

I'm trying to to understand a sample (SdiSquares) from 'Programming Windows
with MFC' from Jeff Prosise.

In InitInstance he uses SetRegisterKey(_T("Local AppWizard-Generated
Applications")) to create an entry in the register for this program.
From his explanation I understood that settings will be stored under the
following key:

HKEY_CURRENT_USER\Software\Local AppWizard-Generated
Applications\SdiSquares\Version 1.0
(HKEY_CURRENT_USER\Software\<companyname>\<productname>\<version>)

From MSDN documentation:

HKEY_CURRENT_USER\Software\<companyname>\<application name>\<section
name>\<value name>

Question 1
Checking the registry  with regedit shows me a different key?

HKEY_CURRENT_USER\Software\Local AppWizard-Generated
Applications\SdiSquares\Recent File list
HKEY_CURRENT_USER\Software\Local AppWizard-Generated
Applications\SdiSquares\Settings

I understood that the first one comes automatically with SDI or MDI program,
but where does Setting come from. Is this a standard subkey, but when is it
generated?
Where is subkey 'Version 1.0' ?

Question 2
How do I add my own subkeys to the registry (not via regedit) ?

Question 3
What can be stored in the registry? (what values, only word-size values)

Question 4
How do you clean up the entered registry entries when uninstalling/removing
the program. (the best and savest way)

Question 5
Is this a good place to save a password (encrypted)?  (low level security)

Question 6
Where can I find good documentation on the use of registers for my
application, and for the use in windows?

Many thanks in advance,  Kimball



Mon, 07 Apr 2003 03:00:00 GMT  
 Q Registers/Subkeys Howto use?

Quote:

> Hello, a question about registers.

> I'm trying to to understand a sample (SdiSquares) from 'Programming Windows
> with MFC' from Jeff Prosise.

> In InitInstance he uses SetRegisterKey(_T("Local AppWizard-Generated
> Applications")) to create an entry in the register for this program.
> From his explanation I understood that settings will be stored under the
> following key:

> HKEY_CURRENT_USER\Software\Local AppWizard-Generated
> Applications\SdiSquares\Version 1.0
> (HKEY_CURRENT_USER\Software\<companyname>\<productname>\<version>)

> From MSDN documentation:

> HKEY_CURRENT_USER\Software\<companyname>\<application name>\<section
> name>\<value name>

> Question 1
> Checking the registry  with regedit shows me a different key?

> HKEY_CURRENT_USER\Software\Local AppWizard-Generated
> Applications\SdiSquares\Recent File list
> HKEY_CURRENT_USER\Software\Local AppWizard-Generated
> Applications\SdiSquares\Settings

> I understood that the first one comes automatically with SDI or MDI program,
> but where does Setting come from. Is this a standard subkey, but when is it
> generated?
> Where is subkey 'Version 1.0' ?

> Question 2
> How do I add my own subkeys to the registry (not via regedit) ?

> Question 3
> What can be stored in the registry? (what values, only word-size values)

> Question 4
> How do you clean up the entered registry entries when uninstalling/removing
> the program. (the best and savest way)

> Question 5
> Is this a good place to save a password (encrypted)?  (low level security)

> Question 6
> Where can I find good documentation on the use of registers for my
> application, and for the use in windows?

> Many thanks in advance,  Kimball

There are several simple wrapper classen on codeguru.com and codeproject.com for the registry.
I generally recommend dough not to use the registry at all for your settings. It's a snakepit.


Mon, 07 Apr 2003 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Q Registers / How to make subkeys? / standard subkeys?

2. Enumerating the subkeys using CRegKey

3. Howto: declare a C function that registers a callback in IDL

4. howto register only whilst running

5. HOWTO: Install/copy COM file, and register it.

6. HOWTO: Register a custom sound with my app?

7. HOWTO: Register a custom sound with my app?

8. HOWTO: register own WINCLASS for CDialog-based windows?

9. How can I change the Security of a Reg Key and its subkeys

10. Writing to Registry Subkeys

11. --- Recap: Qs. about struct ---

12. Qs of getrusage()

 

 
Powered by phpBB® Forum Software