Click here to Skip to main content
15,925,602 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to create a menu item on the fly Pin
Michael Dunn9-Jan-03 5:35
sitebuilderMichael Dunn9-Jan-03 5:35 
Generalsetting up a keyboard system wide hook (contains the code, if you would like to see it...) Pin
Joan M9-Jan-03 5:00
professionalJoan M9-Jan-03 5:00 
GeneralRe: setting up a keyboard system wide hook (contains the code, if you would like to see it...) Pin
Joan M9-Jan-03 5:15
professionalJoan M9-Jan-03 5:15 
GeneralNT Services and MFC Pin
henrik_stromberg9-Jan-03 4:49
henrik_stromberg9-Jan-03 4:49 
GeneralRe: NT Services and MFC Pin
Joan M9-Jan-03 5:03
professionalJoan M9-Jan-03 5:03 
GeneralRe: NT Services and MFC Pin
henrik_stromberg9-Jan-03 20:38
henrik_stromberg9-Jan-03 20:38 
GeneralRe: NT Services and MFC Pin
Carlos Antollini9-Jan-03 5:06
Carlos Antollini9-Jan-03 5:06 
QuestionLocking toolbars/control bars? Pin
Chris Hambleton9-Jan-03 3:57
Chris Hambleton9-Jan-03 3:57 
GeneralDAO DLLs Pin
Anthony B.9-Jan-03 3:42
Anthony B.9-Jan-03 3:42 
GeneralRe: DAO DLLs Pin
Carlos Antollini9-Jan-03 5:11
Carlos Antollini9-Jan-03 5:11 
QuestionPointer to multi-dimensional array? Pin
Dominik Reichl9-Jan-03 3:40
Dominik Reichl9-Jan-03 3:40 
AnswerRe: Pointer to multi-dimensional array? Pin
AlexO9-Jan-03 3:56
AlexO9-Jan-03 3:56 
GeneralRe: Pointer to multi-dimensional array? Pin
Dominik Reichl9-Jan-03 4:21
Dominik Reichl9-Jan-03 4:21 
Generalamutithreads server Pin
smallcoder9-Jan-03 2:27
smallcoder9-Jan-03 2:27 
GeneralPostThreadMessage? Pin
AlexO9-Jan-03 4:30
AlexO9-Jan-03 4:30 
GeneralRe: PostThreadMessage? Pin
smallcoder9-Jan-03 4:59
smallcoder9-Jan-03 4:59 
GeneralRe: PostThreadMessage? Pin
AlexO9-Jan-03 5:35
AlexO9-Jan-03 5:35 
GeneralRe: PostThreadMessage? Pin
AlexO9-Jan-03 5:38
AlexO9-Jan-03 5:38 
GeneralRe: PostThreadMessage? Pin
smallcoder9-Jan-03 6:41
smallcoder9-Jan-03 6:41 
GeneralRe: PostThreadMessage? Pin
AlexO9-Jan-03 7:12
AlexO9-Jan-03 7:12 
GeneralProblem with the registry Pin
Jochem9-Jan-03 1:31
Jochem9-Jan-03 1:31 
The problem is that all data that i save in the registry is gone after windows (2000) is restarted. All data appears to be ok after the application closes. But after the restart the key is completely gone.

The code used in the app:

Opening the key:
HKEY hKeyRoot = HKEY_CURRENT_USER;
LPCTSTR pszPath = "Software\\Companyname\\My App Name\\Settings"
HKEY hKey;
DWORD dw;

RegCreateKeyEx(hKeyRoot, pszPath, 0L, NULL, REG_OPTION_VOLATILE, KEY_ALL_ACCESS, NULL, &hKey, &dw);

Writing:

int iValue = 8;
LPCTSTR pszKey = "MyInteger";
hKey as returned by RegCreateKeyEx

RegSetValueEx(hKey, pszKey, 0L, REG_DWORD, (CONST BYTE*)&iValue, sizeof(int));

Does anyone know how to prevent this and why it happens?

Thanks

I'm smart enough to know that i'm stupid and i'm stupid enough to think that i'm smart
GeneralRe: Problem with the registry Pin
Joan M9-Jan-03 1:39
professionalJoan M9-Jan-03 1:39 
GeneralRe: Problem with the registry Pin
Jochem9-Jan-03 2:37
Jochem9-Jan-03 2:37 
GeneralRe: Problem with the registry Pin
Anonymous9-Jan-03 3:23
Anonymous9-Jan-03 3:23 
GeneralRe: Problem with the registry Pin
Ramu Pulipati9-Jan-03 1:40
Ramu Pulipati9-Jan-03 1:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.