Click here to Skip to main content
15,911,035 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralBitConverter Pin
Arbage30-Sep-03 9:36
Arbage30-Sep-03 9:36 
GeneralRe: BitConverter Pin
Joaquín M López Muñoz30-Sep-03 10:18
Joaquín M López Muñoz30-Sep-03 10:18 
GeneralScrollbar Pin
Anonymous30-Sep-03 8:41
Anonymous30-Sep-03 8:41 
GeneralRe: Scrollbar Pin
Maximilien30-Sep-03 9:22
Maximilien30-Sep-03 9:22 
GeneralRe: Scrollbar Pin
Anonymous1-Oct-03 7:31
Anonymous1-Oct-03 7:31 
GeneralDialog background color Pin
Jahangir Jamshed30-Sep-03 7:23
sussJahangir Jamshed30-Sep-03 7:23 
GeneralRe: Dialog background color Pin
Jahangir Jamshed30-Sep-03 18:10
sussJahangir Jamshed30-Sep-03 18:10 
GeneralRegistry Problem Pin
Anonymous30-Sep-03 6:22
Anonymous30-Sep-03 6:22 
I want to list all sub-keys under a key. In my test I have two sub-keys. I open my key with ::RegOpenKeyEx() and then I put zero into first call for ::RegEnumKeyEx(). I call it again until it does not return ERROR_SUCCESS. This is my code:

HKEY hKey;
CHAR achKey[MAX_KEY_LENGTH];
DWORD i = 0;
if (::RegOpenKeyEx(HKEY_CURRENT_USER, REG_MAJOR_KEY, 0,
  KEY_ALL_ACCESS, &hKey) == ERROR_SUCCESS)
{
  while (::RegEnumKeyEx(hKey, i++, achKey, &cbName, NULL, NULL, NULL,
    &ftLastWriteTime)) == ERROR_SUCCESS)
    print("Found %s", achKey);
  RegCloseKey(hKey);
}


The problem is it finds one key but not the other. Can anyone tell me where I am wrong please? Thank you.
GeneralRe: Registry Problem Pin
David Crow30-Sep-03 7:42
David Crow30-Sep-03 7:42 
GeneralRe: Registry Problem Pin
Michael Dunn30-Sep-03 12:00
sitebuilderMichael Dunn30-Sep-03 12:00 
Generalstring question.. Pin
RobJones30-Sep-03 5:24
RobJones30-Sep-03 5:24 
GeneralRe: string question.. Pin
David Crow30-Sep-03 5:26
David Crow30-Sep-03 5:26 
GeneralRe: string question.. Pin
RobJones30-Sep-03 5:31
RobJones30-Sep-03 5:31 
GeneralRe: string question.. Pin
RobJones30-Sep-03 7:08
RobJones30-Sep-03 7:08 
GeneralRe: string question.. Pin
David Crow30-Sep-03 7:38
David Crow30-Sep-03 7:38 
GeneralRe: string question.. Pin
RobJones30-Sep-03 7:48
RobJones30-Sep-03 7:48 
GeneralRe: string question.. Pin
David Crow30-Sep-03 7:53
David Crow30-Sep-03 7:53 
GeneralRe: string question.. Pin
RobJones30-Sep-03 8:05
RobJones30-Sep-03 8:05 
GeneralRe: string question.. Pin
Arbage30-Sep-03 9:47
Arbage30-Sep-03 9:47 
GeneralRe: string question.. Pin
RobJones30-Sep-03 11:01
RobJones30-Sep-03 11:01 
QuestionYou Ever Wonder Why? Pin
Larry J. Siddens30-Sep-03 4:56
Larry J. Siddens30-Sep-03 4:56 
AnswerRe: You Ever Wonder Why? Pin
Steve S30-Sep-03 5:11
Steve S30-Sep-03 5:11 
GeneralRe: You Ever Wonder Why? Pin
Larry J. Siddens30-Sep-03 5:14
Larry J. Siddens30-Sep-03 5:14 
GeneralRe: You Ever Wonder Why? Pin
Steve S30-Sep-03 5:26
Steve S30-Sep-03 5:26 
GeneralRe: You Ever Wonder Why? Pin
Larry J. Siddens30-Sep-03 5:34
Larry J. Siddens30-Sep-03 5:34 

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.